So you probably see the following error trace within your Passenger log file if you got here:
[ pid=123 thr=1401414 file=ext/nginx/HelperAgent.cpp:964 time=2012-04-27 10:01:49.273 ]: Uncaught exception in PassengerServer client thread:
exception: Cannot accept new connection: Too many open files (24)
backtrace:
in 'Passenger::FileDescriptor Client::acceptConnection()' (HelperAgent.cpp:429)
in 'void Client::threadMain()' (HelperAgent.cpp:953)
You can either
- Lower the maximum number of running Passenger instances. Use
passenger_max_pool_size
within nginx configuration and thePassengerMaxPoolSize
directive in Apache. See [http://www.modrails.com/documentation.html] Passenger documentation for details. - Increase the maximum number of open files per process. If you google around, don't get confused by the forum guys suggesting to look at
cat /proc/sys/fs/file-max
- this is the global maximum, an arbitrary won't be allowed to open that number of FDs. You will have to set limits within/etc/security/limits.conf
in case you need that.
Posted by Thomas Eisenbarth to makandra dev (2012-04-27 08:11)