Too many connections - limit of 150 reached
820123Dec 1 2010 — edited Dec 2 2010We ran into a situation where a program (written in PHP, running under Apache) was spawned via crontab every 30 seconds for test purposes. It connected to the database but did not disconnect.
Net result: Once the program had been started 150 times, the database refused any more connections. No valid users could connect. I couldn't even connect from the oracle privileged account.
Item 1: The process will be modified to explicitly close its connection when done, rather than trusting the job to default behavior of PHP. So, hopefully, we will not run into this a second time.
Item 2: But if we do have this problem again, I need to know how to intervene when the connection limit has been reached. I was not able to connect myself and therefore could not query v$process or related tables to gather any information. I could kill the various (useless) listener processes at the unix command line, but it still took time for Oracle to sense the dead process and mop up. How to accomplish this quickly?
Item 3: I can probably set up the rogue process to login as a different user and then set a resource profile for that user including timeouts. Any suggestions on values for that resource profile?
Item 4: Is there a way to reserve a listener connection for a privileged account such as the DBA?
Thanks for any guidance.
-- Chris Curzon