|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-03-24 18:03 UTC] sniper@php.net
[2003-03-31 02:00 UTC] sniper@php.net
[2003-03-31 02:04 UTC] dean at vipersoft dot co dot uk
[2003-03-31 02:14 UTC] sniper@php.net
[2003-03-31 02:24 UTC] dean at vipersoft dot co dot uk
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 17:00:01 2025 UTC |
Using the sample code below to submit a number of queries to an Oracle database - about every 1 in 10 executions causes the OCIExecute function to simple "hang" for about 10 minutes before timing out. If more information is needed or any sorts of debugging is required, I will follow up to this bug with the requested information. Thanks Dean #!/opt/php/bin/php -q <? $webDbase = "blah"; $webUser = "blah"; $webPassword = "blah"; global $ORACLE_HOME; $ORACLE_HOME = "/opt/oracle/OraHome81"; PutEnv("ORACLE_SID=".$webDbase); PutEnv("LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:$ORACLE_HOME/jdbc/lib"); PutEnv("ORACLE_HOME=".$ORACLE_HOME); $conn = ocilogon($webUser, $webPassword, $webDbase) or die ("Could not connect (Bad background connect Userid or Password) [".Getenv("ORACLE_SID")."]"); // Loop around 4000 times - basically to throw a lot // of queries at the database for ($i=1;$i<=4000;$i++) { echo "Iteration ".$i."\n"; // use a random number to use differing queries $strSQL = "SELECT * FROM blah WHERE id = '".rand(0,50000)."'"; $qid = OCIparse($conn, $strSQL); echo "before execute\n"; OCIexecute($qid); echo "after execute\n"; } echo "Done"; ?> sample output from above when "hung" . . . Iteration 2671 before execute after execute Iteration 2672 before execute after execute Iteration 2673 before execute <then nothing> Notes: * Doesn't happen every time * Happens about 1 in every 10 runs of the above code * Happens from both the CLI php and through Apache * Eventually times out without finishing off its iteration