"Error connecting to server" restoring a course.

"Error connecting to server" restoring a course.

by Martin Greenaway -
Number of replies: 7

Hi there,

I'm trying to restore a course from our live site to our staging site to do some testing. It is < 60Mb in size, which is large but not massively so for our courses.

PHP settings

upload_max_filesize = 192M
post_max_size = 192M
max_execution_time = 120

The file is within the size and the error comes back long before the 120s timeout (which I increased from 30 just in case)

The Javascript error from the console shows a "413 Entity too large" response, although that shouldn't be the case, given the limits set above.  I have restarted apache to ensure any changes have taken effect.

Javascript error

In fact, I've just tried with sample courses much smaller (6Mb, 1Mb) and these have also failed with the same Javascript errors.

NO messages are presented in the apache logs even with developer debugging set.

This is on Moodle 2.9, which I appreciate is old and an upgrade is planned, but that shouldn't be a reason for the system to not accept an imported course from another instance of the same version.

Does anyone have any ideas of things I can check?


Average of ratings: -
In reply to Martin Greenaway

Re: "Error connecting to server" restoring a course.

by Martin Greenaway -

Bumping this in case anyone has any ideas where I should be looking.

In reply to Martin Greenaway

Re: "Error connecting to server" restoring a course.

by Ken Task -
Picture of Particularly helpful Moodlers

Rather  a strange error ... however, after a google search, the issue could be with your browser.   Using FireFox?   Clear cookies and cache of browser.   The try it again.

https://www.google.com/search?q=413+request+too+large

'spirit of sharing', Ken



In reply to Ken Task

Re: "Error connecting to server" restoring a course.

by Martin Greenaway -

Hi Ken,

Thanks for the response - however I've tried on Firefox and Chrome and have tried clearing the cache too on both, to no effect.  I may end up rebuilding the staging environment but, ideally, if I don't have to do that at a busy time that'd be better.

Regards,

Martin

In reply to Martin Greenaway

Re: "Error connecting to server" restoring a course.

by Ken Task -
Picture of Particularly helpful Moodlers

From the hits on Google search:

https://support.mozilla.org/en-US/questions/1180975

which suggest not only additional setups at the workstation browser, but also the server.

so in addition to the extra steps (not just clearing cache/cookies on workstation/browser) but also server ... moodledata/cache moodledata/localcache moodledata/sessions/ (for good mesaure).   Restart apache services as well.

If linux, seldom necessary, but a reboot of server.  (last resort).

'spirit of sharing', Ken



Average of ratings: Useful (1)
In reply to Ken Task

Re: "Error connecting to server" restoring a course.

by Martin Greenaway -
I never got back to you on this - which was rather rude of me, sorry - but yes, this was a Web Application Firewall thing in the end, over which I had no visibility.
Average of ratings: Useful (1)
In reply to Martin Greenaway

Re: "Error connecting to server" restoring a course.

by Charlie E -

Hi Martin,

How did you end up fixing the issue?


Kind Regards,

Charles

In reply to Charlie E

Re: "Error connecting to server" restoring a course.

by Martin Greenaway -

Hi Charlie,  the Web Application Firewall had its own file size upload restrictions on it that were more strict than the Moodle/Apache/PHP settings, which it was imposing.  I had no idea the WAF was doing this, so hadn't thought to ask, but that's where the issue was and the firewall guys fixed that for us (or, we could say, "un-broke" it).