I've the next problem: when performing quite simple PHP scripts, e.g. that one:

<?php

echo "1"

sleep(10)

echo "2"

?>

and open it up in multiple tabs concurrently, the very first tab finishes in ten seconds, nevertheless the seconds waits 20 seconds rather than 10, so I am speculating the demands are "queued" in some way. Any ideas steps to make them execute in parallel?

Configuration is the following: Light stack, Ubuntu 10.10 64bit Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/.9.8l PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2..4 Perl/v5.10.1

I've added

KeepAlive On

MaxKeepAliveRequests

MaxClients 512

MaxRequestsPerChild 100000

to httpd.conf, but on top of that, it is the default httpd.conf that accompany lampp

Sorry if this sounds like a stupid question or it's clarified already, I did not find anything.

Probably its a browser problem. Some browsers possess a limit on the amount of multiple connections towards the same server. Getting queued connections with 2 tabs appears appears to low, so perhaps its one more reason nevertheless its worth looking at the advanced configurations for the browsers.

Also, you might want to add output eliminating after your echo functions and also to output a thing that may offer you more clues to what is happening - for instance the server time.

Getting a terminal window open and tailing the access log will even provide you with a better picture to what is happening.

This may help:

  // function for small sleeps that do not take cpu cycles

  function microdelay($delay) make certain this port is not getting used in your server

    @fsockopen("tcp://localhost", $UNUSED_PORT, $errno, $errstr, $delay)

  

  microdelay(.5) //500ms

  microdelay(.25) //250ms

  microdelay(2.25) //2250ms

When you're using periods another request cannot start take advantage from it before the first shuts. Or use session_write_close() on the first the moment you do not take advantage associated with a session variables any longer.

The various components from the http.conf you've provided suggest that you might reap some rewards by searching only at that file in a little more particulars (MaxKeepAliveRequests - put a far more sensible limit here).

Particularly, do take a look at the amount of servers you've running, e.g.

StartServers       5

MinSpareServers    2

MaxSpareServers    8

ServerLimit       64

This can be a conservative setup for development focus on a nearby workstation. For really low volume concurrent access, it could look something similar to....

 StartServers       8

 MinSpareServers    5

 MaxSpareServers   20

 ServerLimit      256