My server (apache and mysql) don't seem to be tuned to handle multiple page serves at a time. It's really irritating, can anyone help?
I have 4 pages, process1.php, .. process4.php, the code in each page is identical:
<html>
<head>
<title>Process</title>
</head>
<body>
<?php
mysql_query("INSERT INTO wi_importprocs SET pid='".getmypid()."', createdate='".date('Y-m-d H:i:s')."'");
echo getmypid() . "<br><br>";
for($i=1;$i<=15;$i++){
echo $i . "-";
sleep(3);
}
?>
</body>
</html>
from a browser page linking to all 4 pages, I click each of the 4 links. Each page opens in a new window.
Instead of all 4 pages running simultaneously, the first page I opened runs first. The next page opens about 45 seconds later (15x3), then the next, etc..
I know this because the timestamps are about 45 seconds apart.
THIS IS NOT WHAT I WANT! Why is this happening, anyone know? I tend to think there's a problem with my server setting either in apache, mysql, or the server itself.
Thanks,
Sam Fullman