hi, is there a way to monitor the connection pool and check for leaked connections?
matthewd: rails 4.1.2.. the problem we are having is that we run rails via puma (with multiple threads) and set the DATABASE_POOL_SIZE to equal the amount of threads. However, we often get the “could not connect to db in 5 secs” error indicating that the pool was exhausted… so i guess either the connections are not released properly back to the pool, or some connections become unusable somehow.. would like to monitor the usage of the connections in
pool (allocation / deallocation) so that we can see when some part of the code is misbehaving
hi, how can one catch a response problem in respond_to when for example the client has aborted the connection while the request is running?
the issue we face is that the client issues a POST to some endpoint (eg: /a/b) which inserts some stuff in the DB and redirects the client to some other url. Now we see that at times the client aborts the connection and automatically tries to reissue the same POST request (browser?) within a few milliseconds, resulting in duplicate data in the db