4

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!

1 Answer 1

5

There is no special value to mean unlimited. Use some big number (up to 2147483647 on 32-bit platforms) instead.

4
  • 1
    yep, 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! Sep 7, 2012 at 7:05
  • Maxim, 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?
    – wick
    Dec 30, 2014 at 12:30
  • @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. Jan 12, 2015 at 12:46
  • @wick I asked a very similar question: Why would you ever set MaxKeepAliveRequests to anything but unlimited? Apr 19, 2018 at 22:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .