1

I a PHP script that takes about 10 seconds to complete. When I run the request in Chrome in two different tabs, the second request waits for the first request to finish and only than it starts.

When I look in the Timing in chrome I see that Blocking takes 10 second for the second request. Is there any configuration I can do on the server side to prevent that?

I am using XAMPP with Apache 2.4 and PHP 5.5 Everything is done on my localhost

Here is my phpinfo as PDF: phpinfo.pdf

Another thing I have noticed is that it only happens when I am using the exact URL in two different tabs. Event If I use different URL parameters it execute the script simultaneously

enter image description here

enter image description here

Natan Rubinstein
  • 665
  • 1
  • 9
  • 27
  • Are you using sessions? – deceze Aug 14 '14 at 09:13
  • No. I set session.use_cookies=0 in php.ini. I have added a link to my phpinfo. Maybe I am missing someing – Natan Rubinstein Aug 14 '14 at 09:39
  • Are you using any other shared resources, like an open file handle? – deceze Aug 14 '14 at 09:49
  • Could it be http://httpd.apache.org/docs/2.0/mod/mpm_common.html#maxclients ? – SudoGetBeer Aug 14 '14 at 10:06
  • Yes Redis. But would not it count as "waiting" if that was the problem? – Natan Rubinstein Aug 14 '14 at 10:07
  • Don't think its MaxClients problem. This is my configuration: ThreadsPerChild 150 MaxConnectionsPerChild 50 – Natan Rubinstein Aug 17 '14 at 10:32
  • My guess is that this is due to HTTP pipelining, or Apache trying to be smart when optimizing. At this moment, I don't have exact "what to do" type of comment, but you should try and google how to disable it. – N.B. Aug 28 '14 at 15:28
  • I will check that. I have also seen that if I change URL or adds Parameters it does work simultaneously. This question seems related and says it related to the browser cache entry: http://stackoverflow.com/questions/9189591/multiple-ajax-requests-for-same-url – Natan Rubinstein Aug 28 '14 at 15:33

0 Answers0