Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 内存因内存中的多线程而耗尽_Ruby On Rails_Apache_Passenger - Fatal编程技术网

Ruby on rails 内存因内存中的多线程而耗尽

Ruby on rails 内存因内存中的多线程而耗尽,ruby-on-rails,apache,passenger,Ruby On Rails,Apache,Passenger,我的rails应用程序具有带有Apache2+passenger的AWS服务器配置。 从过去的两天开始,我的服务器表现与我预期的不同。当我重新启动服务器时,最初使用的内存非常少,创建了一个线程,几分钟后线程增加,它使用了我的大部分服务器内存,我的服务器崩溃。这给了我类似日志的感觉 [ 2017-06-15 05:01:21.8303 9577/7f54d5583700 age/Cor/Spa/SmartSpawner.h:726 ]: An error occurred while spawni

我的rails应用程序具有带有Apache2+passenger的AWS服务器配置。 从过去的两天开始,我的服务器表现与我预期的不同。当我重新启动服务器时,最初使用的内存非常少,创建了一个线程,几分钟后线程增加,它使用了我的大部分服务器内存,我的服务器崩溃。这给了我类似日志的感觉

[ 2017-06-15 05:01:21.8303 9577/7f54d5583700 age/Cor/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.

[ 2017-06-15 05:01:21.8304 9577/7f54d5583700 age/Cor/Spa/SmartSpawner.h:727 ]: The application preloader seems to have crashed, restarting it and trying again... App 700 stderr: Segmentation fault (core dumped) App 700 stderr: : Cannot allocate memory - fork(2) (Errno::ENOMEM)


htop show output as all memory consume by ruby app .


非常感谢您的帮助。

我也有同样的问题,请怀疑该文件太大,因此可能会失败:

App 1242 stderr: /usr/local/rvm/gems/ruby-1.9.3-p484/gems/passenger-4.0.35/lib/phusion_passenger/preloader_shared_helpers.rb:67:in `fork'

App 1242 stderr: : Cannot allocate memory - fork(2) (Errno::ENOMEM)