| Bug #26558 | High load of OCI-Calls crash on multiprocessor machine with Apache2 | ||||
|---|---|---|---|---|---|
| Submitted: | 9 Dec 2003 4:38am UTC | Modified: | 16 Dec 2003 10:55am UTC | ||
| From: | k_becker at kat dot de | Assigned to: | tony2001 | ||
| Status: | Closed | Category: | OCI8 related | ||
| Version: | 4.3.4 | OS: | Windows 2000 Adv. Server | ||
| Votes: | 1 | Avg. Score: | 4.0 ± 0.0 | Reproduced: | 0 of 0 (0.0%) |
[9 Dec 2003 4:38am UTC] k_becker at kat dot de
[10 Dec 2003 5:56am UTC] k_becker at kat dot de
I tried the "MaxThreadsPerChild=1" from Bug#19517. No crashes, but Apache "... ran out of threads". Then set MaxRequestsPerChild 100000, ThreadsPerChild 100 and tried using the explicit Oracle address string from TNSnames.ora. This seems to work. Then tried php4-win32-STABLE-latest.zip of 2003-dec-10: Same result. I now have: Apache/1.3.28 (Win32) PHP/4.3.5-dev, OCI8 Revision: 1.183.2.7 on Windows 2000 adv. server build 2195 with MaxRequestsPerChild 100000, ThreadsPerChild 100. Temporary solution seems to be using the TNS address string in OCILogon("user", "pass", "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT =1521)))(CONNECT_DATA=(SID=xxx))") So, problem seems to be in the Oracle/Oci8 name resolving in concurrent OCILogon()'s from multiple Apache/PHP-threads.
[10 Dec 2003 9:19am UTC] tony2001@php.net
it seems to me, this bug appears due to the fact, that current implementation of ext/oci8 doesn't use OCI_THREADED flag with OCIInitialize(); Maxim tells about it here: http://www.zend.com/lists/php-dev/200301/msg00213.html OCI docs about OCI's thread safety are here: http://docs.linux.cz/Oracle8/server/a58234/new_adva.htm#427495 I think, I can add this feature shortly.
[16 Dec 2003 10:55am UTC] tony2001@php.net
This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. should be fixed in CVS.
