I have a Ruby 1.8.7 app which runs under Phusion Passenger and Nginx, for one of my clients, on an Ubuntu VPS. It's been ticking away happily for years, but yesterday ran out of log space (sending me an error via monit which i use to monitor it).

I cleared out the bloated log file by doing the following:

sudo cat /dev/null > log/production.log

then restarted and it was back to normal. This morning, i've got another error, which i've not seen before. I don't know if it's related to the log problem, it might just be a coincidence, but it's odd to get two problems so close together after literally years of nothing at all going wrong. I haven't made any changes to anything.

This is the stack trace i see:

Passenger encountered the following error:
The application spawner server exited unexpectedly: Connection closed

Exception class:
#   File    Line    Location
0   /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/rack/application_spawner.rb 118 in `spawn_application'
1   /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb    257 in `spawn_rack_application'
2   /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb   82  in `synchronize'
3   /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb   79  in `synchronize'
4   /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb    244 in `spawn_rack_application'
5   /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb    137 in `spawn_application'
6   /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb    275 in `handle_spawn_application'
7   /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb  357 in `__send__'
8   /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb  357 in `server_main_loop'
9   /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb  206 in `start_synchronously'
10  /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/helper-scripts/passenger-spawn-server 99  

I've tried restarting it by doing

touch tmp/restart.txt

in the project folder, which is the normal restart procedure for the app, and also restarting nginx. I still get the same error.

Kind of out of ideas - has anyone seen this error before or have any ideas on how to fix it?

  • I actually just fixed it by restarting the VPS on rackspace (the hosting service) - seems fine now. "One of those things". – Max Williams Apr 29 '16 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.