Ask a Question

ERROR: org.postgresql.util.PSQLException: FATAL: too many connections

SOLVED
wwilbur
Occasional Contributor

ERROR: org.postgresql.util.PSQLException: FATAL: too many connections

I have closed all connections to the Postgresql database, closed all apps connecting to it, rebooted my computer and still get the above message. This has happened many times for the Postgresql databases. Is there a way to fix. I do not have admin to increase connections so need to find a way to make sure all connections are closed before starting script

 

5 REPLIES 5
richie
Community Hero

Hey @wwilbur,

Have a look at this stackoverflow.

https://stackoverflow.com/questions/5108876/kill-a-postgresql-session-connection

I dont know anything about postgresql, but it sounds similar to oracle in that theres a table that lists the active db connections that you can drop.

So id suggest first step in a setup testsuite in readyapi as having a couple of JDBC steps to do this.

Cheers,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
wwilbur
Occasional Contributor

I tried this but it did not work, thank you for replying

Hey @wwilbur,

The info on the stackoverflow page (the query) should work as the table holds a list of all the connections. Can you clarify exactly what you did and what occurred when you tried? Cos killing that pid works.

Ive re-read your description again and im guessing that keeping active connections in the pool is an issue with postgresql, so theres not much you can do from the other end of things (ReadyAPI) to resolve. This is NOT an issue with ReadyAPI, so the resolution at best is gonna be running a query or a kill command in the OS or something similar. This issue would occur whatever application was hitting the database. Thats where you need to resolve the issue, im thinking

Cheers

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
wwilbur
Occasional Contributor

I went ahead and used another Postgresql database that does not contain PCI information. It worked

Sincerely,

Bill Wilbur
Quality Assurance Analyst
Information Technology
O'Reilly Auto Parts
(417) 862-2674 ext. 1603

The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
sonya_m
SmartBear Alumni (Retired)

Thank you for helping, Rich!

 

Hi @wwilbur, thanks a lot for sharing your solution. 


Sonya Mihaljova
Community and Education Specialist

cancel
Showing results for 
Search instead for 
Did you mean: