Connection was reset when uploading files via php form

When I try to upload images using a slow internet connection (Using dongle) browser always throw out a 'The Connection was reset' error after sometime. I was trying to upload a very small image file 500kb.

There is no problem when i use a fast ADSL connection.

Linode 768

my php.ini - from phpinfo()

max_execution_time    180
max_file_uploads    20
max_input_nesting_level    64
max_input_time    180
max_input_vars    1000
memory_limit    128M
post_max_size    28M


Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5

I'm sure it is some apache server setting of my linode causing this because the same file uploads just fine in other sites with slow connection.

I greatly appreciate any advice where I should look for a fix


2 Replies

Considering it doesn't quite work when using a slower connection, I suggest you increase your timeout values. In particular, the values for maxexecutiontime and maxinputtime could safely be increased. Both of these are currently set to 180 seconds, or 3 minutes - does that roughly correspond to your "some time" estimation?

Also, out of curiosity, when you say that the dongle-based connection is slow, how slow are we talking? Do you know your maximum upload speed? If you don't, could you try someting like (note: requires Adobe Flash) and check your upload speed?

The reset occurs around 5mins which reflect the Apache timeout of 300.

Speed Test: (my linode in Tokyo so I tested for Tokyo)

Ping - 425ms

Download - 2.26Mbps

Upload - 0.22Mbps

I'm also getting similar complaints from users who using mobile broadband to upload images to my site.

The problem is that with the same connection I can upload images to other sites in the net.

I observed in Google chrome when I upload the image file it show the progress in % bottom left corner.

In my site upload usually get stuck around 30%

In another site I tested upload get stuck time to time but it will keep on resuming.

Maybe its Not a php or Apache error? Maybe its my server network settings causing the problem?


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct