#19517 [Com]: the oci8 function cause apache to crash

From: Date: Sun, 11 May 2003 21:46:53 +0000
Subject: #19517 [Com]: the oci8 function cause apache to crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39460@lists.php.net to get a copy of this message
ID: 19517 Comment by: flop dot m at usa dot net Reported By: f dot labanvoye at cg70 dot fr Status: No Feedback Bug Type: OCI8 related Operating System: windows 2000 and linux PHP Version: 4.2.3 New Comment: Hello, I'm having the same trouble (not always, but often - when server is receiving lots of user queries). TNS-12154 when executing OCILogon method. It seems that an error occurs at the same time on the Oracle side, at least, in the sqlnet.log, some errors is logged, and I could not find the description of that error on Oracle's web site. Thus, I changed my OCILogon from OCILogon('user', 'pass', 'tns alias'); to $tns = <the actual line describing my listener from the tnsnames.ora file>; OCILogon('user', 'pass', $tns); and bingo, no more crashes ;) My guess is when PHP sends too many lookups in a short time, something in the oci call crashs. So, is it in PHP side, or Oracle side, I don't know. I hope this will help to pinpoint/correct that pretty much annoying bug. Previous Comments: ------------------------------------------------------------------------ [2002-12-06 19:14:04] sniper@php.net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ [2002-11-26 20:14:08] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip ------------------------------------------------------------------------ [2002-11-26 15:33:36] maxim@php.net This might be an Apache 2 problem. Can you reproduce the crash with the latest CVS release on Apache over 2.0.43? ------------------------------------------------------------------------ [2002-11-05 14:13:23] willie_gollino at hp dot com I get this error in my apache error log when multithreading is turned on: [notice] child pid 28373 exit signal Segmentation fault (11) Apache: 2.0.X (mpm worker) OS: HP-UX 11.00 (with linker patches) PHP: 4.2.2 dso with oci8 extension Oracle: 8.1.6 If I set ThreadsPerChild to 1 (single threaded), I don't get any segfaults. With ThreadsPerChild set to 2 (or higher) I get the segmentation faults with as few as 2 concurrent requests (ab -n 10 -c 2 http://testurl/). With particularly high load (>100 concurrent requests) Apache 2 hangs, and has to be killed. I also get this error message in my php log: "PHP Warning: _oci_open_server: ORA-12154: TNS:could not resolve service name" On the same system, Apache 1.3.26 with PHP as CGI works perfectly. ------------------------------------------------------------------------ [2002-09-20 03:30:06] f dot labanvoye at cg70 dot fr on medium/high load and on multi-threaded serveurs ( apache 1.3.X windows and apache 2.0.X (mpm=worker) on linux), oci cause segmentation fault to apache. I test with apache 1.3.26 / 2.0.40 on windows 2000 server and professionnal, php 4.2.3, oracle 8.1.7.0 and 9.0.1 ( on the same and different Pc). I test with and without autocommit. i always get the same result. the script: <? $c = ocilogon ( 'test', "test", "db9"); $sql = "select count(id) as nb_row from test"; $stmt = ociparse ( $c, $sql ); ociexecute ( $stmt ); ocifetchinto ( $stmt, $tab ); print_r ( $tab ); ocilogoff ( $c ); ?> i run test with microsoft web apllication stress tools and ab. the error message is : _oci_open_server: ORA12154 TNS: could not resolve service name. All works fine with linux / apache 1.3.X. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19517&edit=1

« previous php.bugs (#39460) next »