Martin Šajna
Martin Šajna

Reputation: 123

How to increase number of apache processes or concurrent php files?

The problem was not in my server, it was somewhere in network or browsers... I guess some kind of policy against DDoS attacks, where you can't access multiple files on server from one IP at once.

I have a question for you. I'm testing quad core ubuntu server. I installed lamp, the apache is apparently using prefork ("/usr/sbin/apache2 -l").

The problem is that I can't run more then 6 php files at once. For example I create 10 php daemons, but only 6 of them actually start doing something... other ones are waiting until something ends. If I'll access any php file from the browser at the time of those php files running the browser just hangs there (keeps loading -- actually just waiting).

Is there a way how to increase that? I tried to change the etc/apache2/apache2.conf file, to increase the StartServers, MinSpareServers and MaxSpareServers, but that didn't help. I know that server can handle the load easily.

Anyone can answer this?

Upvotes: 0

Views: 8249

Answers (2)

Kévin Dupont
Kévin Dupont

Reputation: 29

I guess that you're looking for the directive "pm.max_children" in your /etc/php5/fpm/pool.d/yoursite.conf

Try to increase it.

Upvotes: 0

Chris Wiegman
Chris Wiegman

Reputation: 382

How are you running PHP? Are you using fastcgi, mod_php, etc?

This: http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients might help you, but the limit might also be in your PHP depending on your php.ini configuration.

Upvotes: 1

Related Questions