i use code like this to prevent deadlock.
while($retry<3 and $notsone)
{
try
{
$transaction->commit();
$notdone=false;
}
catch
{
$transaction->rollback();
$retry++;
}
}
if ($retry==3)
{
throw new exeption("deadlock found!");
}
i test code with running code in 6 different browser concurrently . sometimes in some browser i see a deadlock found message but sometimes i got a message from apache http server. apache http server has stopped working. i have 2 option. close program or check for online solution.
my question is do concurrency problem cause apache hang? how to prevant this?