We are uploading 10 files to our PHP frontend (4MB total) and Chrome always return "Connection closed" like the server dropped the http request. Of course we tried all the browsers and both Windows and Mac, we even tried with different ISPs, so we can exclude that the problem is client-side.

This happens only in the production environment, but we have a test environment which is identical (but in a different VM) and the problem doesn't appear in it (event using the same 10 files).

# php.ini
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
max_file_uploads = 20
file_uploads = On
post_max_size = 50M
upload_max_filesize = 12M

We have tried even with bigger files and sometimes it works. But in some cases, with some files, it doesn't work (the files area essentially images and pdfs)

Looking at apache/php logs, there is no evidence that an error occurred, it seems that everything it fine. The access log shows POST /mypage 200

We already spent some good 12 hours on this weird issue, but still we can't figure out what's the problem.

  • Try uploading smaller files, as small as possible. eg. will 1kb upload? If it will, determine the size that breaks it by uploading something half way between that and your current failing files, then split the difference in half again. – James L Oct 23 '12 at 15:16
  • 1
    We have tried even bigger files and it works! We have only some cases in which, with some files, it doesn't work (the files area essentially images and pdfs) – paul.ago Oct 23 '12 at 15:20
  • 2
    Do you have any non-ASCII characters in the filenames? This has sometimes triggered seriously weird behavior, both client- and serverside. – Piskvor Oct 23 '12 at 15:26
  • 1
    Is Prod behind a reverse proxy? – HTTP500 Oct 23 '12 at 15:50
  • Yes, but at some point the sysop disabled it, routing the HTTP traffic directly to the apache webserver. When we were routing the traffic throgh the balencer (apache whith mod_proxy) we got this message: [Tue Oct 23 11:40:02 2012] [error] proxy: pass request body failed to (myhostname.com) from () – paul.ago Oct 23 '12 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.