1

My apache server is sending incomplete and corrupted content to browser. 95% of responses are not correct, by estimation. It seems like apache sends some part (of random or relative length) of requested data and then it sends duplicate of response.

How does it look like?
Let's say I am requesting jquery.js file. Some part of file is sent to browser, then there are headers data of response and then is content of the file from beginning. Content data ends when filesize (content-length of first response) is reached.

Here is a picture for visualisation
enter image description here

This happens with almost everything what is meant to be send to browser including content generated by PHP. At first I thought only larger files are corrupted (like 83kB jquery file) but HTML content generated by PHP is damaged too and its size is not larger than 10kB.

When response for HTML content is damaged, content is downloading for next 5 seconds after displayed content is downloaded and console in chrome webdeveloper tools says:

net::ERR_INCOMPLETE_CHUNKED_ENCODING

When has it started?
Everything was OK for almost month (since wampserver installation). Last known change in computer, before I noticed the problem, was installation of Python27 with PIP and Hyde tools.

How can I fix it? I have been looking into it since yesterday morning and I am still far far away from solution.
Thanks for any help

edit:

Sample from apache error log (today). I did restart manually.

[Sat Mar 21 10:22:46.519391 2015] [mpm_winnt:notice] [pid 1760:tid 532] AH00455: Apache/2.4.9 (Win64) PHP/5.5.12 configured -- resuming normal operations
[Sat Mar 21 10:22:46.534418 2015] [mpm_winnt:notice] [pid 1760:tid 532] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:42:59
[Sat Mar 21 10:22:46.535402 2015] [core:notice] [pid 1760:tid 532] AH00094: Command line: 'C:\\Program Files\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d C:/Program Files/wamp/bin/apache/apache2.4.9'
[Sat Mar 21 10:22:46.538403 2015] [mpm_winnt:notice] [pid 1760:tid 532] AH00418: Parent: Created child process 5612
[Sat Mar 21 10:22:46.857571 2015] [mpm_winnt:notice] [pid 5612:tid 452] AH00354: Child: Starting 64 worker threads.
[Sat Mar 21 10:27:52.586368 2015] [mpm_winnt:notice] [pid 1760:tid 532] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sat Mar 21 10:27:54.588487 2015] [mpm_winnt:notice] [pid 5612:tid 452] AH00364: Child: All worker threads have exited.
[Sat Mar 21 10:27:54.628495 2015] [mpm_winnt:notice] [pid 1760:tid 532] AH00430: Parent: Child process 5612 exited successfully.
[Sat Mar 21 10:32:45.603700 2015] [mpm_winnt:notice] [pid 4732:tid 532] AH00455: Apache/2.4.9 (Win64) PHP/5.5.12 configured -- resuming normal operations
[Sat Mar 21 10:32:45.604701 2015] [mpm_winnt:notice] [pid 4732:tid 532] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:42:59
[Sat Mar 21 10:32:45.604701 2015] [core:notice] [pid 4732:tid 532] AH00094: Command line: 'C:\\Program Files\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d C:/Program Files/wamp/bin/apache/apache2.4.9'
[Sat Mar 21 10:32:45.607701 2015] [mpm_winnt:notice] [pid 4732:tid 532] AH00418: Parent: Created child process 6684
[Sat Mar 21 10:32:45.930932 2015] [mpm_winnt:notice] [pid 6684:tid 452] AH00354: Child: Starting 64 worker threads.

Temporary solution:

Disable cache for resources in Chrome DevTools and set header Cache-control: no-cache for generated content. What could be the reason for this behavior?

miro
  • 735
  • 8
  • 16
  • Any errors in your http servers error log file? This looks like worker processing dying. – arkascha Mar 21 '15 at 10:22
  • Error log seems to be OK, just notices about receiving shutdown signal, how many threads have been started or exited. The same type of messages as before an issue. – miro Mar 21 '15 at 10:40
  • "as before an issue."? What does that mean? That the http server restarts processes on every such issue as described above? – arkascha Mar 21 '15 at 10:46
  • no, before problem described in question apeared for the first time. sorry for a confusion. – miro Mar 21 '15 at 10:48
  • http://stackoverflow.com/questions/23217824/neterr-incomplete-chunked-encoding – arkascha Mar 21 '15 at 10:55
  • http://stackoverflow.com/questions/22608564/neterr-incomplete-chunked-encoding-in-chrome-only – arkascha Mar 21 '15 at 10:56
  • Could also be related to the use of http-2.0 with starts appearing in some http server packages. Let me guess, yo uare using Chromium as a browser? – arkascha Mar 21 '15 at 10:58
  • of course I read questions you linked but their solutions did not worked for me. No, I use normal Chrome browser. – miro Mar 21 '15 at 11:22
  • That's what I meant. You read about the issues with the emerging http 2 protocol and the Chrome browser? It's just a guess, but that error appeared for others when switching. Maybe you did without knowing, when upgrading? You should be able to easily spot that in the network tab of your browsers development console. – arkascha Mar 21 '15 at 11:51
  • issue appears in every browser. when I disable cache in devtools and set cache-control to no-cache in generated headers, it seems to work properly. but this is just temporary solution, I have to find out the reason of this behavior. – miro Mar 21 '15 at 12:14
  • OK, so it apparently is cache related. But you say the two issues I linked further up, which deal with cache issues and this error message did not match in your case. Sorry, then I am out of ideas. – arkascha Mar 21 '15 at 12:23
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/73477/discussion-between-miresvk-and-arkascha). – miro Mar 21 '15 at 12:25
  • Sorry, no, cannot discuss myself without you taking part. – arkascha Mar 21 '15 at 12:27

1 Answers1

1

I still do not know why it was as it was but described problem caused AVG antivirus software. After disabling it (actually I changed it for another), everything works fine.

Edit (fix)

AVG support reply:

Our development team believe that the latest update, hotfix 4, will resolve this issue. Please update your program (not definitions) and ensure you have built 5863.

miro
  • 735
  • 8
  • 16