100% Cpu usage With Passenger/ ROR/ Nginx

377 views
Skip to first unread message

testing applify

unread,
Mar 3, 2017, 2:09:50 AM3/3/17
to Phusion Passenger Discussions
Hello everyone,

We are facing issues on our production server .  CPU usage becomes 100% but RAM usages appears normal .  nginx displays message , though it starts working after nginx restart or after 2-3 minutes . Kindly help how can I fix this issue 
I have added following values in my virtual host file 


passenger_max_request_queue_size 500;
passenger_spawn_method smart;

passenger_max_preloader_idle_time 200;
passenger_pool_idle_time 200;



Ruby on rails version : Rails 5.0.1

Phusion Passenger 5.1.2

nginx version: nginx/1.10.2


Our server configuration is following

Amazon Ec2

Cpu :  8 Core
RAM 32 GB



In my log files , I get 


[ 2017-02-26 08:20:40.0745 25827/7ff1b3490700 age/Cor/App/Poo/AnalyticsCollection.cpp:61 ]: ERROR: Cannot fork() a new process: Cannot allocate memory (errno=12)
  Backtrace:
     in 'void Passenger::ApplicationPool2::Pool::realCollectAnalytics()' (AnalyticsCollection.cpp:183)
     in 'static void Passenger::ApplicationPool2::Pool::collectAnalytics(Passenger::ApplicationPool2::PoolPtr)' (AnalyticsCollection.cpp:56)

[ 2017-03-03 01:29:37.1251 15088/7f7189b63700 age/Cor/Con/CheckoutSession.cpp:269 ]: [Client 1-286217] Returning HTTP 503 due to: Request queue full (configured max. size: 500)
[ 2017-03-03 02:12:19.2311 15088/7f719049c700 age/Cor/CoreMain.cpp:907 ]: Checking whether to disconnect long-running connections for process 2215, application /var/www/html/projectname/public (development)
App 7110 stdout: 


Please let me know if any other information is required

Daniel Knoppel

unread,
Mar 3, 2017, 10:30:18 AM3/3/17
to Phusion Passenger Discussions
The logs complain that the server is out of memory. That does not match your statement that RAM usage appears normal?

Did you look at passenger-status? And passenger-memory-stats?

- Daniel
Reply all
Reply to author
Forward
0 new messages