mctomp
By:
mctomp

2 requests at the same time on the same browser problem

April 20, 2014 1.7k views
Hello, i have a problem with my server while i'm trying to open 2 requests at the same time on the same browser.. for example: i'm trying to open a specific page and as long as he runs i can't open a different page on the server in the new window until the first page has finished loading is there a way to fix it? I have on the droplets CentOS 6.3 x64 and i just installed: php (v 5.3.3) apache (Apache/2.2.15 (CentOS)) mysql (5.1.67) webmin without any change of the configuration setting Here is the info page http://www.solcrm.com/info.php Thank you very much!
5 Answers
Is there some kind of resource heavy php operation going on in that page? It looks like you have the mpm_prefork module loaded. What are its settings?

Could you post the block starting with "# prefork MPM" from your /etc/httpd/conf/httpd.conf file?
Hello,
here is the block:


# 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
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves

ServerLimit 1000
MaxClients 1000



# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers 4
MaxClients 300
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0




thank you
Try changing the prefork values to:


<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>


and restart apache.
Thank you for your help,,

I changed it and it still doesn't work..

It's likely that the user's session is still locked i.e. the session file on the hard drive is open by the first request, and PHP has to wait for the session to be closed before running a second request. When you're confident that the session will no longer be read/written to, use session_write_close() to close the session, free up the session file and allow another request to be processed.
Have another answer? Share your knowledge.