how to kill unused connections
i have web written in php (4.3.9) which is connected to the oracle DB (10g). user can submit query and see results. Time to time i got error in web application:
ociplogon(): _oci_open_server: ORA-12516: TNS:listener could not find available handler with matching protocol stack
users can not login and perform query. after reset of httpd, web goes to normal.
after googling i found:
- this error is caused because max limit of connections to the oracle is reached
- so i guess there are some dead/unused connections to the DB and are cleaned by reset of httpd
- user is connected by php command ociplogon which is persistent
- "OCILogoff() does nothing at the moment..." (bugs.php.net/bug.php?id=11234)
is there some way how to clean unused/dead connections? set so开发者_开发百科me timeout?
This is because of lot of open connection to the DB, after doing specified operation you are suppose to close.
Look into oci_close
Docs to learn how to close an OCI connection and oci_connect
Docs for more information about connecting to OCI.
精彩评论