2

My Rails app currently runs on Passenger. We have six machines in production with each machine having 45 instances of passenger. Each instance of Passenger seems to be having a open connection with MySQL. So there are about 270 open connections with MySQL.

A few minutes after the application is started MySQL seems to at 400% CPU and the application almost becomes non-responsive with a lot of pending requests in the global queue.

Prior to this release the application was running on Mongrel (six machines with each machine running 5 instances of mongrel). We did not see any issues there.

Will reducing the number of Passenger instances solve the issue? Is there a way we can have a connection pool for the passenger instances (Instead of each instance having a separate connection).

Thanks,
Sivakumar

Sivakumar
  • 890
  • 1
  • 14
  • 27

1 Answers1

0

Passenger shares db connections among all processes. Make sure your database.yml has a high pool size.

passenger-hosted-rails-app-painfully

Community
  • 1
  • 1
Horacio
  • 2,727
  • 5
  • 26
  • 29
  • For posterity's sake, I want to note that this may not be true. See [this post](https://groups.google.com/forum/#!topic/phusion-passenger/hfdeaysTqPo). – twelve17 Apr 08 '14 at 12:09