On Wednesday, 24 April 2013 07:41:23 UTC-4, [email protected] wrote: > > Hi, > > We have our rails application running on AWS. we have two application > servers and one database(postgres) server of C1.xlarge > <http://aws.amazon.com/ec2/instance-types/> 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/Ha-Fa1ET8icJ. For more options, visit https://groups.google.com/groups/opt_out.

