开发者

php quits connecting to Oracle

We've got an ongoing issue where php 5.2.6 will quit connecting to Oracle 10.2.0.4.0. We can go weeks without any issues and then (usually Saturday mornings) php will no longer be able to connect. The database is up and running and we can connect to it manually with varous DB tools but php won't ever connect again until we reboot the web server. The web server is running IIS 6.0.

We connect using $connection = oci_connect ($userID, $password, $TNS) where $TNS is the appropriare TNS in the local tnsnames.ora file. We go through a connection manager at our data center but I don't know the details on how that works.

One of the reasons this has been dogging us is that we're not really sure who is causing the problem and the various logs haven't shed any light on that. I开发者_开发技巧s it a php issue as it would appear or is the DB itself for some reason rejecting the connections, or is it perhaps the connection manager? Some input in figuring that out would help a lot. Our load is lighter on weekends so that should be the issue. We haven't been able to find any outside processes that could be initiating the problem.


Not really a "root cause" solution, but if you're not using FastCGI, a switch to FastCGI might help with this issue. A PHP process in FastCGI does not live for "weeks". Since the oracle client is loaded dynamically into the PHP process, the automatic process restarts you get with FastCGI should be identical to a web server restart. You can always tweak the FastCGI settings to restart the process more or less often.

If you're using ISAPI, that probably is your root cause though. PHP and ISAPI are bad news when combined. Problems are almost inevitable.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜