Passenger Memory Consumes 99% Memory

1,187 views
Skip to first unread message

Ivan Gonzales

unread,
Jul 28, 2017, 8:51:17 AM7/28/17
to phusion-...@googlegroups.com
Hi,

Any way to solve this issue? Passenger process consumes really high memory usage, it is increasing from time to time until it reached 99% taking our application to be unresponsive. 
We need to restart the apache to refresh the memory usage. 
Using Passenger version 5.1.6, Ruby 2.3.1, Rails4, Apache2, 24GB Ram with 12Cores, Ubuntu 14.04. with Sidekiq as worker

```
ID Owner Size Command
11141 root 6.20 GB Passenger core
11414 ucc 4.61 GB Passenger RubyApp: /home/ucc/c1-prod/cumulusone_rc
11421 ucc 3.80 GB Passenger RubyApp: /home/ucc/c1-prod/cumulusone_rc
11428 ucc 2.93 GB Passenger RubyApp: /home/ucc/c1-prod/cumulusone_rc
11435 ucc 2.05 GB Passenger RubyApp: /home/ucc/c1-prod/cumulusone_rc
11442 ucc 1.36 GB Passenger RubyApp: /home/ucc/c1-prod/cumulusone_rc
11449 ucc 943.81 MB Passenger RubyApp: /home/ucc/c1-prod/cumulusone_rc
1147 mysql 793.82 MB /usr/sbin/mysqld
```

Some random passenger-memory-stats.

We are also trying some passenger configs like setting the PassengerMinInstance and PassengerMaxPoolSize but no luck.

See also the attached image, you can see that our server hits almost 100% :(

Thank You,

Ivan Gonzales
IMG_25072017_130748_0.png

Daniel Knoppel

unread,
Jul 28, 2017, 9:04:05 AM7/28/17
to Phusion Passenger Discussions
Your application processes ("Passenger RubyApp") are using a lot of memory, not Passenger. You can use passenger-memory-stats to inspect usage. Passenger can help work around memory leaks in apps with the following options:

Ivan Gonzales

unread,
Jul 28, 2017, 10:04:41 AM7/28/17
to Phusion Passenger Discussions
Okay, but one question, will that be an issue if my passenger ruby is set to this?

  PassengerDefaultRuby /usr/bin/passenger_free_ruby

and as i get the ruby version for passenger_free_ruby, it is ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
but i expect my app to use the ruby-2.3.1 installed from my RVM

Thanks again

Ivan Gonzales

unread,
Jul 28, 2017, 11:04:32 AM7/28/17
to Phusion Passenger Discussions
Then, i am expecting that the memory usage will go down for few minutes the app is on idle state, but why it is not?

Daniel Knoppel

unread,
Jul 28, 2017, 11:10:29 AM7/28/17
to Phusion Passenger Discussions
Memory usage won't go down if the memory use is due to your app leaking memory. Leaked memory is only freed when the application process exits or is killed, which is exactly what you can ask Passenger to do for you using the links I sent you.

- Daniel

Ivan Gonzales

unread,
Jul 28, 2017, 11:30:09 AM7/28/17
to Phusion Passenger Discussions
Thanks for this information :)

Will look and observe if Sidekiq causes the memory leak
Reply all
Reply to author
Forward
0 new messages