It is not clear to me how to avoid blocking the nginx reactor loop when
creating an nginx module which should perform some long I/O operations
and return the response to the client. Or is this handled internally by
Any hints are appreciated.
I've been doing some work using limit_req to prevent overzealous clients
from DOS'ing my site. Specifically, I wanted to use a different HTTP status
code such as 420 or 429 so that it would be straightforward to show a "hey
man, chill out" page rather than my generic 503 error page.
Attached is a patch that enables this option for the limit_req directive.
It still defaults to 503, but you can set it to any 4xx or 5xx value of
your choosing by specifying
limit_req zone=foo burst=10 status_code=420;
I hope I've sent this to the right place. Please let me know where else to
send it if I'm in the wrong place.
I have a strange problem with cache size on XFS. I tried to debug it and I
First there is a test request for 1 file which is 10 MB.
In the function ngx_http_file_cache_update I have counted size 17039360
because st_blocks = 33280, st_size = 10486040.
After that I am trying to restart the server and cache manager add this
size for cache structure but the size is different as follow
for cache size the increment is with 10489856, st_size = 10486040,
st_blocks = 20488
As could be seen st_blocks is different for one and the same file.
I think the second file size is right but why the first is wrong?
Thanks in advance