4

I am running Linux CentOS 5.8 and I have my web pages using WordPress 4.0.

I am trying to uplad jpg photos to server via WordPress, but it randomly fails. I uploaded few photos, and then I get errors like:

“4.JPG” has failed to upload due to an error
The uploaded file was only partially uploaded.

Then I try again and again and again until it is successfuly uploaded. Very frustrating.

How can I debug this? Is there a log file? Where to look for?

  • 1
    Can you add more info on what webserver this is running on? Does this only happen with big files? – kraftner Jan 29 '15 at 14:07
  • 1
    Files are only 100 kB. Webserver is Apache. – Danijel Jan 29 '15 at 14:18
  • 1
    Same problem here. Apache/Debian. – Jo Smo Nov 10 '16 at 20:25
1

I solved it by adding

<?php header ("Connection: close"); ?> 

in file.php situated under wp-admin/include

  • Never ever edit core files and BTW how does it solve the issue. – bravokeyl Nov 14 '16 at 5:30
  • Yes it worked perfectly ! – hashtagerrors Nov 14 '16 at 5:33
  • Yes worked, but how? – Davinder Kumar Feb 19 '18 at 7:48
1

Look at replay by Roberto:

https://stackoverflow.com/questions/33375823/error-dispatching-request-to-apache

RequestReadTimeout handshake=0 header=20-600,MinRate=500 body=20,MinRate=500

By default Apache will stop upload after 20-30 seconds. With this directive placed into Apache config upload will continue up to 600 seconds as long as user is sending at least 500 bytes/s.

0

I ran into the same problem and tried doing a google search and came up with so many technical suggestions that I could not begin to even start as I'm not tech savvy. I did run into an article where a blogger said she contacted her hosting server and they changed the PHP version. It may or may not work for me but I was going to try.

Only I didn't know how to do that and I just got off with customer support and basically what he did was increase my bandwidth. I still couldn't upload. I did tell him in the add media library page it did say max upload file size was 2MB. But it wasn't until I refresh the page that the change kicked in and I saw my maximum upload file size was 256 MB. After that I was able to upload photos just fine!

0

I managed to resolve this problem with changing Apache server configuration: there is a KeepAlive flag which needs to be turned Off.

More about this flag:

Apache Optimization: KeepAlive On or Off?

0

I solved this, by removing libapache2-mod-php5filter:

apt-get remove libapache2-mod-php5filter

and installing libapache2-mod-php5:

apt-get install libapache2-mod-php5

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.