我刚刚在一个全新的 Ubuntu 13.04 机器上安装了乘客 + nginx,并尝试运行一个在其他几台服务器上运行良好的应用程序。
每次我尝试在生产中运行应用程序时,我都会得到:
An error occurred while starting up the preloader: it did not write a startup response in time.
Application root
/home/avishai/apps/XXX/current
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV and PASSENGER_ENV)
production
Ruby interpreter command
/home/avishai/.rvm/wrappers/ruby-1.9.3-p448/ruby
User and groups
Unknown
Environment variables
Unknown
Ulimits
Unknown
乘客可以在开发模式下加载应用程序,但不能在生产模式下加载。nginx 错误日志显示以下内容:
[ 2013-08-14 17:09:14.8321 17810/7f99daebd700 Pool2/Spawner.h:738 ]: [App 17843 stdout]
[ 2013-08-14 17:10:44.8406 17810/7f99daebd700 Pool2/Implementation.cpp:774 ]: Could not spawn process for group /home/avishai/apps/XXX/current#default: 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-08-14 17:10:44.8409 17810/7f99d8f9e700 agents/HelperAgent/RequestHandler.h:1888 ]: [Client 20] Cannot checkout session. An error occurred while starting up the preloader: it did not write a startup response in time.
[ 2013-08-14 17:10:44.8412 17810/7f99d8f9e700 agents/HelperAgent/RequestHandler.h:1888 ]: [Client 21] Cannot checkout session. An error occurred while starting up the preloader: it did not write a startup response in time.
我处于死胡同。如何让应用程序加载?