0

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?

Mathew Thompson
  • 55,877
  • 15
  • 127
  • 148
Martin Šajna
  • 123
  • 2
  • 8
  • Are you using file-based sessions? PHP locks session files while a script using them is active, which prevents any parallel requests in the same session from running. It won't matter how high the apache child limit is, you'd never be able to have more then one active script per-user at a time. – Marc B Apr 15 '12 at 03:44

2 Answers2

1

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.

Chris Wiegman
  • 382
  • 1
  • 2
  • 10
  • I dont thing the php.ini is the problem, there is nothing that could limit the concurrency. I adjusted the MaxClients at 300... but that didn't help either. – Martin Šajna Apr 15 '12 at 01:46
0

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.

MikeT
  • 51,415
  • 16
  • 49
  • 68
Kévin Dupont
  • 31
  • 1
  • 4