Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I set as usual a VM with a standard configuration of Apache + Passenger hosting a Rails 3.2 app. The app is working with Sphinxsearch 2.0.4 via the thinking sphinx gem.

After the deploy, at first time the site is hit by an HTTP request, the typical thinking sphinx tasks (building index and start) are executed and after some seconds of delay, an error page is displayed with error:

 [ 2013-06-19 17:07:35.1643 16678/7f2ee30ef700 Pool2/Implementation.cpp:774 ]: Could not spawn process for group /srv/www/ An error occurred while starting up the preloader: it did not write a startup response in time.
      in 'void Passenger::ApplicationPool2::SmartSpawner::throwPreloaderSpawnException(const string&, Passenger::SpawnException::ErrorKind, Passenger::ApplicationPool2::Spawner::BackgroundIOCapturerPtr&, const DebugDirPtr&)' (SmartSpawner.h:150)
      in 'std::string Passenger::ApplicationPool2::SmartSpawner::negotiatePreloaderStartup(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:558)
      in 'void Passenger::ApplicationPool2::SmartSpawner::startPreloader()' (SmartSpawner.h:206)
      in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::SmartSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (SmartSpawner.h:744)
      in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (Implementation.cpp:707)

 [ 2013-06-19 17:07:35.1646 16678/7f2ee0a53700 agents/HelperAgent/RequestHandler.h:1889 ]: [Client 20] Cannot checkout session. An error occurred while starting up the preloader: it did not write a startup response in time.

Seems like the request goes in timeout and can't be answered.

Is the preloader needed and there is a way to disable it?

These are the interesting apache directives:

 LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.5/libout/apache2/
 PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.5
 PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-1.9.3-p429/ruby

 PassengerHighPerformance on
 PassengerMaxPoolSize 10
 PassengerMinInstances 3
share|improve this question
up vote 0 down vote accepted

With Passenger >= 4.0 you must check that no application-specific statement (like indexing and starting Thinkingsphinx) is included into the

Asked the developers to fix, now the problem is solved.

share|improve this answer
This answer can be closed. – fsoppelsa Jul 5 '13 at 9:02
How do you avoid that when trying to mount different apps like Sinatra? like map "/jobs" do use Airbrake::Rack #run lambda { |env| raise "Rack down" } use Rack::ShowExceptions run Sidekiq::Web end – Avishai Aug 20 '13 at 12:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.