Nginx keepalive_requests - What value to use for unlimited?
5,985
There is no special value to mean unlimited. Use some big number (up to 2147483647 on 32-bit platforms) instead.
Related videos on Youtube
![محمّد محسن احمدی](https://lh6.googleusercontent.com/-LJnlAS0iDl4/AAAAAAAAAAI/AAAAAAAABik/oXb7Cr-LcBw/photo.jpg?sz=256)
Author by
محمّد محسن احمدی
Updated on September 18, 2022Comments
-
محمّد محسن احمدی almost 2 years
We are using an nginx backend behind a nginx proxy.
We use upstream keepalives.
They work quite nicely.
We were wondering, what value would we set
keepalive_requests
on the backend to set the maximum number of keepalive requests to unlimited?Thanks!
-
محمّد محسن احمدی almost 12 yearsyep, we have taken a look at the nginx source. nothing in there that would point to a value that sets keepalive_requests to unlimited. this will have to do. thanks!
-
wick over 9 yearsMaxim, and what's the point of not having an option to let infinite keep-alive? If a connection is actively used why would it have to be reopen every N http requests?
-
Maxim Dounin over 9 years@wick, the main reason is that there are some allocations from a connection memory pool which may happen, and the connection have to be closed to free the memory.
-
Jonathon Reinhart about 6 years@wick I asked a very similar question: Why would you ever set MaxKeepAliveRequests to anything but unlimited?