My application is based on Ruby 2.2.0, Rails 4.1.9, nginx 1.8.0, Phusion Passenger - 5.0.11 and the application is deployed on EC2 instance, 2 cores and 8GB RAM. But sometimes it shows me following error in the log file:
stderr: Errno::ENOMEM
App 13088 stderr: )
App 13088 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/preloader_shared_helpers.rb:69:in `accept_and_process_next_client'
App 13088 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/preloader_shared_helpers.rb:139:in `run_main_loop'
App 13088 stderr: from /usr/share/passenger/helper-scripts/rack-preloader.rb:154:in `<module:App>'
App 13088 stderr: from /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
App 13088 stderr: from /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'
[ 2015-12-28 15:16:56.6347 24663/7f161b3e6700 App/Implementation.cpp:303 ]: Could not spawn process for application /var/www/project123: An error occurred while starting the web application. It exited before signalling successful startup back to Phusion Passenger.
Error ID: 392ad659
Error details saved to: /tmp/passenger-error-fHmsZh.html
Message from application: An error occurred while starting the web application. It exited before signalling successful startup back to Phusion Passenger. Please read <a href="https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems">this article</a> for more information about this problem.<br>
<h2>Raw process output:</h2>
(empty)
[ 2015-12-28 15:16:56.6348 24663/7f161b3e6700 Spa/SmartSpawner.h:726 ]: An error occurred while spawning a process: An error occurred while starting the web application. It exited before signalling successful startup back to Phusion Passenger.
[ 2015-12-28 15:16:56.6390 24663/7f161b3e6700 Spa/SmartSpawner.h:727 ]: The application preloader seems to have crashed, restarting it and trying again...
App 13205 stdout: Using: /home/ubuntu/.rvm/gems/ruby-2.2.0@found.fy
App 13205 stdout:
[ 2015-12-28 15:17:02.5000 24663/7f161b3e6700 App/Implementation.cpp:303 ]: Could not spawn process for application /var//www/project123: An error occurred while starting the web application. It exited before signalling successful startup back to Phusion Passenger.
Error ID: 63c3eb0c
Error details saved to: /tmp/passenger-error-62IksC.html
Message from application: An error occurred while starting the web application. It exited before signalling successful startup back to Phusion Passenger. Please read <a href="https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems">this article</a> for more information about this problem.<br>
<h2>Raw process output:</h2>
(empty)
App 13205 stderr: /usr/lib/ruby/vendor_ruby/phusion_passenger/preloader_shared_helpers.rb:69:in `fork'
-- INSERT -- 840,1 4%
And my sites stop working, do you know why this is error is coming? I also check the memory usage but nothing cause to error related with the memory.