For the past two months, I have been receiving the following error on Chrome's developer console:
net::ERR_INCOMPLETE_CHUNKED_ENCODING
Symptoms:
- Pages not loading.
- Truncated CSS and JS files.
- Pages hanging.
Server environment:
- Apache 2.2.22
- PHP
- Ubuntu
This is happening to me on our in-house Apache server. It is not happening to anybody else - i.e. None of our users are experiencing this problem - nor is anybody else on our dev team.
Other people are accessing the exact same server with the exact same version of Chrome. I have also tried disabling all extensions and browsing in Incognito mode - to no effect.
I have used Firefox and the exact same thing is occurring. Truncated files and whatnot. The only thing is, Firefox doesn't raise any console errors so you need to inspect the HTTP request via Firebug to see the problem.
Response Headers from Apache:
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:close
Content-Encoding:gzip
Content-Type:text/html; charset=utf-8
Date:Mon, 27 Apr 2015 10:52:52 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Pragma:no-cache
Server:Apache/2.2.22 (Ubuntu)
Transfer-Encoding:chunked
Vary:Accept-Encoding
X-Powered-By:PHP/5.3.10-1ubuntu3.8
While testing, I was able to fix the issue by forcing HTTP 1.0 in my htaccess file:
SetEnv downgrade-1.0
This gets rid of the problem. However, forcing HTTP 1.0 over HTTP 1.1 is not a proper solution.
Update: Because I'm the only one experiencing this issue, I figured that I needed to spend more time investigating whether or not it was a client side issue. If I go into Chrome's settings and use the "Restore to Default" option, the problem will disappear for about 10-20 minutes. Then it returns.
while($row = mysql_fetch_assoc($result))
may be too much empty lines that causes the truncation by web browsers – Marniemaro