After I upgraded my desktop to Windows 11 I started to notice those error messages in the log:
Jun 3 21:46:43 SS nginx: 2024/06/03 21:46:43 [error] 13437#13437: *32614 limiting requests, excess: 20.615 by zone "authlimit", client: 192.168.1.9, server: , request: "PROPFIND /login HTTP/1.1", host: "192.168.1.6"
I was getting 16-17 of those error messages per second. Too many and the GUI (that nginx is running) will respond with a 503 and the server needs to be rebooted.
It turned out that they are caused by my file synchronization software Syncovery that backs-up data from the desktop to the unraid server. The developer of Syncovery confirmed that Syncovery uses SMB and does not execute any PROPFINDs, which is WebDAV. So it seems as if Windows 11 is mixing SMB and WebDAV somehow. There are also many reports about that error by others recently.
Instead of fixing Windows 11 I was looking for a way to increase the rate limit. It worked and I am not getting these errors anymore since 3 days.
See general information here for what is going on: https://blog.nginx.org/blog/rate-limiting-nginx . Limits are set per client (ie. IP)
To increase the limit:
open the nginx config file at /etc/nginx/nginx.conf
Look for the request limiting config statement: limit_req_zone $binary_remote_addr zone=authlimit:1m rate=30r/m;
1m: size of the shared memory zone: 1m is big enough to keep information for about 16,000 IP addresses
rate=30r/m: limits requests to 30 requests per minute
Increase the rate (r) per time (m=minute) e.g. to 60r/s (s=second) (=120x)
"nginx -t" to test the configuration
"nginx -s reload" to restart with the new configuration see: https://nginx.org/en/docs/beginners_guide.html
Note: nginx.conf only defines the limit. The ./conf.d/locations.conf applies the limit with the command: limit_req zone=authlimit burst=20 nodelay; This means that 20 more requests can be accepted and are queued without delay to be processed within the limit set by the rate. I did not change this.
I have increased the limit to 60r/s (120x) and the error messages stopped.
Unfortunately, the changes to the config file do not persist a reboot. Hence this report.
@limetech Tom, could you suggest a way to make those changes stick or provide other means to customize the rate or increase the rate e.g. to 60r/s or even higher in one of the next releases?
Any suggestion for an interim fix? Ie. run a script at startup that overwrites and reloads the patched nginx.conf? When/how to run this best?
Thanks, Tom
Recommended Comments
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.