I am trying to run multiple PHP script files same time (in chrome browser) but it seems like WAMP is limiting on maximum 8. What should be the correct settings to allow more than 8 ? Is it possible to run multiple workers of the httpd.exe instance like in NGINX ?
-
2What do you mean by multiple script files? Please explain better – OmniPotens Mar 16 '13 at 14:08
-
8 different php files with multiple loops (execution time ... thousand of seconds) run same time – Max Sanchez Mar 16 '13 at 14:14
4 Answers
I think you must change maxclients
in apache configs. You configs must have something like this:
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
for more information have a look at this: http://fuscata.com/kb/set-maxclients-apache-prefork

- 2,687
- 2
- 30
- 51
The problem you are running into is probably not related to the server, but to the browser. Browsers only allow a limited number of simultaneous connections to a certain server, so if you want to overcome that limit, you would have to use different servers.
You could do that in your hosts file, using different names to route to the same host, for example (on different lines for clarity):
127.0.0.1 server1.local
127.0.0.1 server2.local
127.0.0.1 server3.local
127.0.0.1 server4.local
etc.
Now you can have 8 (I thought it was 6 for Chrome) connections to server1.local
, 8 to server2.local
, etc.
Edit: See this question for more information.
Go to :
<xampp_root>/xamppfiles/etc/httpd.conf
And confirm that the following is uncommented:
# Server-pool management (MPM specific)
#Include <xampp_root>/etc/extra/httpd-mpm.conf
(Obviously leave the comment itself commented and uncomment the line below).
Then go to:
<xampp_root>/etc/extra/httpd-mpm.conf
And confirm if the value for the line:
MaxClients 150
Is above 8.

- 36,459
- 25
- 97
- 163
-
I had and have the settings presented by Mostafa Shahverdy but the #Include
/etc/extra/httpd-mpm.conf was commented indeed... – Max Sanchez Mar 16 '13 at 14:44
Per this advise, if you want to increase the concurrent amount of execution per SINGLE user, you should turn of:
session.auto_start
(you can check with phpinfo()
if it's turned on or not)
or inside script (if session was started independently,like:
session_start();
// do stuff, read vars etc...
session_write_close();
// do something that takes a long time....
session_start();
// now update sesson vars with the result

- 53,146
- 19
- 236
- 237