> Recently had a bit of an issue with the default nginx.conf and running
> out of files. By default, login.conf imposes a limit of 128 files,
> which is not nearly sufficient to process the configured 1024
> connections.

Right.

> We need to fix two things. First, raise the file limit to 1024.
> Second, lower the connection limit slightly. We need to save some file
> handles for logging and opening files and what not. nginx should (I
> hope) deal with hitting its own connection limit more calmly than
> unexpected accept()/open() failures.

Yes, that's a good start.  There is a better example of doing this this
in relayd or ypldapd.  There, a reservation has estimated for libc overhead,
plus a input means reserve an output scheme.

benno and I tried to explain this to upstream nginx, but they didn't
understand the issue... and simply return an error.  Sigh.  Welcome
to the web.  Fail simple, rather than fail smart.

> We can have many fine arguments about what these default values should
> be; for now I'm simply adjusting the config to self-consistent. 1024
> files is not such a preposterous amount in my opinion.

Seems ok.

Reply via email to