Moodle download submissions 504 and other timeouts

Moodle download submissions 504 and other timeouts

by Tyson Parker -
Number of replies: 0
Less of a question and more of a statement to help others. I have a setup that has been rebuilt a few times and am learning each time. Our latest is a nginx proxy in front of our Moodle server. We had all kinds of timeouts and issues that always end up being a timeout in either nginx, apache or php.

I found other threads discussing this but most had no answer and were locked. So figured I'd post my findings to help others, if you have settings that work for you please share.

Nginx server:
/etc/nginx/nginx.conf

Added to the http block (there are other settings here, these are the related settings to this issue)
http {

#This line added for moodle max size upload per https://docs.moodle.org/37/en/File_upload_size

client_max_body_size 2048m;

#Added to increase timeout to prevent 504 error

fastcgi_read_timeout 900;

fastcgi_send_timeout 900;

proxy_read_timeout 900;

send_timeout 900;

proxy_connect_timeout 900;

}

On the Moodle Server behind the Nginx server
Edit /etc/php/7.2/apache2/php.ini

Add or update the following
max_execution_time = 900
max_input_time = 600
memory_limit = 128M

Also on the Moodle server for apache
/etc/apache2/apache2.conf

Update this:
Timeout 600

Hope this saves someone a few hours of time.

Average of ratings: Useful (2)