2

I have a really annoying problem using Google Chrome developing websites. I develop website on localhost (IIS 7 + PHP) and sometimes (often enough) it happens that when I refresh a page I’m working on, it takes a really long time to be loaded, even if it’s a simple script with an “echo” or a little bit more. I have this problem with Windows 8/8.1 and Windows 10 (on Windows 7 I never met this, but I don't check from a while).

I tried invoking the page with 127.0.0.1, change my hosts file, etc. but nothing changed.

Looking at the network tab of the debug tools (F12) I’ve seen that for some reason the script invoked keep staying in “pending” status for a long time.

Why this happens? Is there a way to force every process to be closed before starting new one? Is a problem with Chrome settings, IIS configuration, programming code or else?

Thanks for help

Fabio
  • 31
  • 7
  • Does it have a database connection to a remote source? – sanderbee Aug 26 '15 at 11:09
  • Yes, the page get datas from a MySQL Server (the connection is made through IP Address and not by DNS name, if it cares...) – Fabio Aug 26 '15 at 11:17
  • External MySQL connections over TCP/IP are really slow. Can you test if that causes the slowing down by temporary disable the mysql connection? – sanderbee Aug 26 '15 at 11:30
  • It's not so simple, beacuse the website need the database in order to work. The strange thins is that this problem occours only with Google Chrome. Any other browsers works fine.. – Fabio Aug 26 '15 at 11:40
  • And it's a problem that recurs occasionally… e.g. I open a page, click something and everything is ok, after a while - maybe having changed some part of the code - I refresh the page and it keeps loading for a long time (30 sec. more or less) and then it goes on normally. If I close and reopen Chrome, it works fine for a while and then has the same problem. – Fabio Aug 26 '15 at 11:40
  • It seems that between the two refresh, Chrome keeps some connection active and when I refresh it stays blocked because it reaches the maximum six TCP connection per origin rule (as explained here: https://developer.chrome.com/devtools/docs/network#resource-network-timing) The problem is that I don’t know why there are this connections active and how to stop them – Fabio Aug 26 '15 at 11:40
  • I understand that the website need a database to run, but i only suggested it, so we can find the reason for the problem. If the problem still exists after you disable the database connection, the database connection is not the problem. I suggest this, because we have had a similair problem in the past where the database (that uses TCP connection) was the reason. – sanderbee Aug 26 '15 at 11:50
  • Ok, I tried with a static html page (no db connection, no php code, only the inclusion of jquery, css and other graphical things, everything locally loaded) but the problem persists... (by the way, how did you solved your TCP connection problem?) – Fabio Aug 26 '15 at 12:21
  • That's strange... I didn't know anymore options, only the common ones like firewall and virus protection but i bet you try that allready. We solve it by setting up a local MySQL server in our network and setup a master-master replication between the external and local database server. In that way we can develop with fast connections on our local computers, and see the full (combined) result on the external server. – sanderbee Aug 26 '15 at 12:30
  • Thanks for your replies. Anyway I misunderstood your first question: I thought the problem you suggested was having the MySql server on another machine (on LAN) instead of on localhost and not a remote MySQL through internet connection, and it seems strange to me because LAN connection is actually fast ;) I’ll keep looking for a solution of my problem… – Fabio Aug 26 '15 at 12:39
  • Ahh i see;)! Your welcome. Good luck with it – sanderbee Aug 26 '15 at 12:41
  • Maybe that workaround may help : http://stackoverflow.com/questions/5585918/what-does-pending-mean-for-request-in-chrome-developer-window/32988982#32988982 – SebastienC Oct 07 '15 at 09:48

0 Answers0