Why are HTTP requests getting stuck on pending in Chrome?
Well, I think, doing the following has removed the lag from my machine.
Before the solution, here are my assumptions:
- Chrome is doing parallel requests whenever "Prediction service toload pages quickly is enabled"
- My Apache web server was not handling those parallel requests.
Solution:
I included the
mpm
modules file for apache. You can find thebelow line inhttpd.conf
file:#Include conf/extra/httpd-mpm.conf
and uncomment it.Windows uses the mpm_winnt_module for mpm.
This Multi-Processing Module (MPM) is the default for the Windows NT operating systems. It uses a single control process which launches a single child process which in turn creates threads to handle requests
Find the lines below and uncomment them:
EnableMMAP off EnableSendfile onAcceptFilter http noneAcceptFilter https none#Extra Notes#mmap is memory map by apache, don't know I have uncommented this, had read aboutthis somewhere, but anyway its Off so should not be a Burden on OS#EnableSendFile:Delivering static files? This link may help:https://groups.drupal.org/node/68333#AcceptFilter: windows mpm module, suggests to keep it as none. I went through this : https://httpd.apache.org/docs/2.4/mod/core.htmland have set AcceptFilter http/https as "connect", it works fine for me. Please note: I am using Apache 2.4.23
- Restart your apache
That's it!
I am leaving this question as unaccepted because:
- I don't know if what I did is right.
- Although I enabled the
winnt
module, I couldn't find the modulefile anywhere in my apache directory, although changes in theThreadsPerChild is reflected, I guess apache doesn't need anexternalwinnt
module. - Although I can observe that the page load speed has increased andrequests are not getting stuck anymore, I can still see interleaved
failed and finshed
requests for every request in my chromeconsole.
Your answers will be really valuable and make things more clear.
This issue occurs due to your slow internet speed..When onInit() calls it loades all the webservices & wait for the completion of first webservice .when execution of first service is over then second service will start executing but still it was in Pending state hence it shows you 'Pending' in status column of Network