postgresql - Kill all database connections on heroku when max connections have been reached -


My example has a maximum of 16 connections. As soon as I realized that I had the 19 connection, I used to hurry to kill one, who goes out to open a standard connection with the same priority and boundaries.

I have now reached the absolute maximum number of connections, which is 20 , and even pg: ps or Pg: killall can not.

How can I destroy all the connections, or do anything to reduce the number of connections now? The blocked query is too long (looks like select * from the table containing 410k entries).

$ heroku pg: info -a XYZ === HEROKU_POSTGRESQL_COBALT_URL (DATABASE_URL) Plan: Original Status: Available Connection: 19 PG Version: 9.1.11 Created: 2013-03-12 15: 11 UTC data size: 7.16 GB Tables: 103 Fork / Follow: Unsupported rollback: unsupported $ Heroco PG: PS-A XYZ Prop. Source | Is running for Wait | (...) $ heroku pg: kill 12593- one XYZ pg_cancel_backend ------------------- T (1 line) $ heroku pg: ps -a XYZ psql: FATAL : Too many connections to role "ABC"! Heroku client internal error! Search here for help: https://help.heroku.com! Or report a bug: https://github.com/heroku/heroku/issues/new Error: Undefined method `[] 'for zero: NilClass (NoMethodError) Backcount: / Home / Chrisis / .heroku / Client / Lib / heroku / command / pg.rb: 442: `version '/home/chris/.heroku/client/lib/heroku/command/pg.rb: 447: in` nine_two?' In /home/chris/.heroku/client/lib/heroku/command/pg.rb:451:in `pid_column '/home/chris/.heroku/client/lib/heroku/command/pg.rb#26:in `Ps' /home/chris/.heroku/client/lib/heroku/command.rb.0018:IN 'Run' / Home / Chrisis /. Harokee / Client / Lib / Harokee / ClearRb37: 'Start' / Usr / local / heroku / bin / heroku: 24: `& lt; Main & gt; Command: Haraoke PG: PS-A XYZ Edition: Heroica-ToolsBell / 3. 9.6 (x86_64-linux) Ruby / 2.0.0 $ Halo PG: Killer-A XYZ SSQL: Fatal: Lots of connections for role "ABC" ! Heroku client internal error! Search here for help: https://help.heroku.com! Or report a bug: https://github.com/heroku/heroku/issues/new Error: Undefined method `[] 'for zero: NilClass (NoMethodError) Backcount: / Home / Chrisis / .heroku / Client / Lib / heroku / command / pg.rb: 442: `version '/home/chris/.heroku/client/lib/heroku/command/pg.rb: 447: in` nine_two?' In /home/chris/.heroku/client/lib/heroku/command/pg.rb:451:in`pid_column '/home/chris/.heroku/client/lib/heroku/command/pg.rb7272: IN` Killall '/home/chris/.heroku/client/lib/heroku/command.rb.0018:IN' Play '/home/chris/.heroku/client/lib/heroku/cli.rb37:IN' Start '/ Usr / Local / heroku / bin / heroku: 24: `& lt; Main & gt; Command: Heroku Postgraduate: Killall - A XYZ Version: Heroku-Toolbelt / 3.9.6 (x86_64-linux) Dark Red / $ 2.0.0 Heroku PG: Information XYZ-A === HEROKU_POSTGRESQL_COBALT_URL (DATABASE_URL) Plan: Basic Status: Connection Available: 20 PG Version: 9.1.11 Created: 2013-03-12 15:11 UTC Data Size: 8.24 GB Tables: 103 Fork / Follow: Unsupported Rollback: Unsupported < / Div>

I have the following toolbelt add-ons that are completely

caught the job

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -