Seafile makes lots of request to reverseproxy

I use Nginx as a reverse proxy for my seafile server. The seafile server is not 24/7 powered on. So when the client tries to connect it won’t get always a response. The problem is however that the client makes a lot of requests.

2018/01/27 16:50:39 [error] 6626#6626: *58809 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: seafile.x.nl,$
2018/01/27 16:50:39 [error] 6626#6626: *58802 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: seafile.x.nl,$
2018/01/27 16:50:39 [error] 6626#6626: *58810 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: seafile.x.nl,$
2018/01/27 16:50:42 [error] 6626#6626: *58801 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: seafile.x.nl,$
2018/01/27 16:50:42 [error] 6626#6626: *58782 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: seafile.x.nl,$
2018/01/27 16:51:03 [error] 6626#6626: *58814 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: seafile.x.nl,$
2018/01/27 16:51:03 [error] 6626#6626: *58809 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: seafile.x.nl,$
2018/01/27 16:51:03 [error] 6626#6626: *58802 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: seafile.x.nl,$
2018/01/27 16:51:03 [error] 6626#6626: *58810 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: seafile.x.nl,$
2018/01/27 16:51:03 [error] 6626#6626: *58801 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: seafile.x.nl,$
2018/01/27 16:51:10 [error] 6626#6626: *58782 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: seafile.x.nl,$
2018/01/27 16:51:10 [error] 6626#6626: *58814 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: seafile.x.nl,$
2018/01/27 16:51:10 [error] 6626#6626: *58809 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: seafile.x.nl,$

Is there somewhere a setting that can reduce the amount of request when there is no server available.

It’s good that it tries but this many times looks to me a bit overdone. After 5 bad request a pause for 15 minutes or so would be nice.

The reason my seafile server is shutdown is because normally i don’t need the service during the day. And if i do i can remotely turn the server on. The reverse proxy is on a different computer with a more suitable power consumption and a few other things that need to run 24/7 but doesn’t have that much harddrive’s to store the seafile data.

Vps or ded server online? Might be the better solution here. You could use something like the Hetzner cloud where they only charge for online hours and have a max cap for monthly payments. Storage is also cheap.

15 min break is a bit long. It’s could be 30-90sec though. Also it could check if the service is actually available before sending requests again.

With over 100GB (according to seafile) it would cost me a lot. Almost 20 EUR a month without the fee /uhr. So hosting myself is a lot cheaper then that.

There is no option to reduce the amount of request. It also wouldn’t have much of an advantage. If there are too many log message for seafile in nginx you can disable the error logging for the seafile host in nginx.

What about using a Seafile hoster like us? See https://en.yoursecurecloud.de/individuals/prices.html

100 GB would cost 7,99€/Month and we do maintancene for you and you can use all Seafile Pro Features.

The logging is not the problem. The requests keeps the reverse proxy server unnecessarily busy.

It’s not a SeaFile problem, you should ask some at the nginx forum. The control of the requests should be somewhere at /etc/nginx, but when you do it you could have problems when seafile is online, e.g. when you’re deleting a libary with the seadrive client or when you have WebDAV enabled. Finally, I think you should move to an online server. My Server at 1blu costs 24,99$ per month and I’ve got 1TB space.

But there’s another solution with more performance than DynDNS and without the problem. You could rent a Virtual Server for 5$/month, where you put your seafile and nginx server. Now your mounting your old Server with sftp(sshfs) at /seafile-data/storage/blocks. Now the temporary files are on the New Server and everything other at home. Of course you have to backup mariadb (logical backups) and the old blocks folder, and put in back in the new directories. Because the sftp mount is also called blocks, you don’t have to make any changes to the SQL code of SeaFile. I tried it just for fun with two of my servers and it really works!

I think (and can understand) he is not searching for a different solution.

To the problem, there is a setting to check how often Seafile checks for unread notifications, but there is nothing else one can do. I also don’t think it is worth any time (in case of a server outage the average user wants to be connected as fast as possible as well).

UNREAD_NOTIFICATIONS_REQUEST_INTERVAL = 3 * 60 # seconds (seahub_settings.py)

1 Like

FYI this is definitely a Seafile client issue. The central IT administration at the large global company where I work have notified me repeatedly that my computer has bombarded the proxy with requests for my home Seafile server address - to the point where my computer singlehandedly has DoSed the proxy enough to cause disruption to other users.

This seems to happen whenever there’s a slight network outage beforehand. After a while IT simply had to take the drastic measure to ban accesses to my server address.

The standard way of solving failed connects like this is to progressively increase the delay until next try.

If that is even possible - I mean we are talking about one computer in a big computer - the network design is a complete failure.

Irrelevant and beside the point. Apparently the Seafile client can go into a “busy loop” where it repeatedly accesses the proxy as fast as the CPU and network interface is able to send out requests.

That’s bad programming, and has in at least one case caused disruption.

(I use the Seafile client for personal use on my home network, but don’t always turn it off when I arrive at work)

Ok, this surely looks like a bug but is not really related to this topic in specific.

It’s not terrible as Troed described. But still I think it is something in the client en not in the proxy as suggested. 3 or 4 request a minute constantly the hole day is something the client does.

And that is an expected behavior.

That’s the only option you have to try to reduce it.

1 Like