Re: URGENT:Rails application crashed for 700 request per minute.

32 views
Skip to first unread message

Matt Jones

unread,
Apr 25, 2013, 1:08:44 PM4/25/13
to rubyonra...@googlegroups.com


On Wednesday, 24 April 2013 07:41:23 UTC-4, visha...@googlemail.com wrote:
Hi,

We have our rails application running on AWS. we have two application servers  and one database(postgres) server of C1.xlarge  AWS instance type.
Our passengermaxpoolsize is set to  30. And postgresql max connection limit is 100. 
Recently we found that when we got nearly 700 request per minute, our application created nearly crossed the max connection limit of postgres server and our application server went into waiting state and utilized nearly 100% of CPU and RAM.

Can anyone guide us what might be cause of this crash? How rails processes using the connection pool configuration?


There's a 'pool' setting you can put in database.yml (alongside the DB adapter, etc) to set the number of connections in the pool. By default it's 5, so that would explain the crash - 30 Passenger workers x 5 connections per worker = more than 100. You may just want to bump the number up in Postgres.

--Matt Jones
 
Reply all
Reply to author
Forward
0 new messages