Connection to the server was reset



Hello all,

I am hosting a moodle install on my website. I didn’t use the One Click
Install but a manual install. Everything is working great except for 1
thing. I need to allow my students to be able to upload large files
through the assignment submissions area.

I am aware of the php.ini and cgi file changes that need to be made in order to allow the max_upload_size etc. to be large enough for uploads. I have also set my domain to use Fast CGI and regular CGI in the web panel options. However, I am getting an error when students attempt to upload any files larger then about 40MB. Here is the error:

The connection to the server was reset while the page was loading.

It seems to be a timeout issue but I have set the page and script times
in the php.ini file to be more than sufficient I think. The file seems to
be attempting to be uploaded from anywhere between 45s and 90s before erroring out.

Do you have any idea as to what is causing this connection to be reset?
As far as I can tell the software should be allowing it. Or am I missing
something obvious?

Thanks everyone!



The files are too big. The HTTP-protocol is not really suited for large files, and on shared webhosting there are some limits you cannot set in php.ini etc.

You could make an ftp-account for upload, and - somehow - move them to moodle, or link to them from moodle.


Did you try using the FastCGI SAPI /w a disaptch.fcgi wrapper? One of the Wiki pages mentions the memory restriction is relaxed when that is used; maybe the process time is as well. But yeah, DH has a process killer for long running processes and unfortunately CGI counts toward that.

You know you are using FastCGI correctly when you can log into shell and run ‘top -u username’ and you see 3 php5.cgi processes running for a long time.

Customer since 2000 :cool:


You should be able to upload 40MB files. Vars to take into account are:

post_max_size = n (MBytes)
upload_max_filesize = n (MBytes)
max_execution_time = n (seconds)

There could be limits set within your script, so double-check the admin section.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost