开发者

how to kill unused connections

开发者 https://www.devze.com 2023-03-25 23:56 出处:网络
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:

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_closeDocs to learn how to close an OCI connection and oci_connectDocs for more information about connecting to OCI.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号