Hardware and performance

 
 
Picture of Daniel Lombardo
Optimizing for Grade Import and stopping: "Timeout waiting for output from CGI script"
 

Hi Moodle Community

We are using a lot of grade imports but to limited success. This error is found in the server logs after I try to import: 

"Timeout waiting for output from CGI script"

Please offer advice or some help getting started with learning how to optimize Moodle to prevent these kinds of timeouts. Are there help manuals for those new in this area? I am currently in a full-time position as the Online course manager of a Moodle and would like to become an expert in optimizing its performance.

Thanks for checking out my topic. Looking forward to hearing from someone soon.

Cheers

M

 
Average of ratings: -
Picture of Ken Task
Re: Optimizing for Grade Import and stopping: "Timeout waiting for output from CGI script"
Group Particularly helpful Moodlers

Does debugging have any more information?

The following *might* address the immediate issue cause it *sounds like* import process might require more time to complete (given what little information shared).  Check php.ini for 'timeouts' ...

; http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time
max_execution_time = 120

; http://www.php.net/manual/en/info.configuration.php#ini.max-input-time
max_input_time = 150

Values you see above are for php on a server I manage and may not be appropriate for your usage/entity/system - which no one in the forum could assist with any accuracty if not known! ;)

Apache error_log has been known to provide clues.

From experience can tell you that each system is different, therefore there are only 'ball park' tweak settings - PHP, MySQL, and Apache. Might want to disclose something about your operating system (specs/versions [PHP, MySQL, Apache], etc.) and include version of Moodle as well. 

If you'd care not to share, then:

http://docs.moodle.org/24/en/Performance_recommendations

'spirit of sharing', Ken

 

 
Average of ratings:Useful (2)
Picture of Daniel Lombardo
Re: Optimizing for Grade Import and stopping: "Timeout waiting for output from CGI script"
 

Hi Ken

I am totally on board with that spirit. Mad busy right now, will get the Apache log files asap.

Your tips already helped me get on track. Our host is on Siteground.com, I found the error log but it's limited to missing files and script time-outs from what I have seen in there. I will look in cpanel again to find more logs for the other services.

 
Average of ratings: -
Picture of Ken Task
Re: Optimizing for Grade Import and stopping: "Timeout waiting for output from CGI script"
Group Particularly helpful Moodlers

Ahh .... remotely hosted and shared could mean SiteGround has determined your site/software is using resources beyond package purchased.  Thus, SiteGround server simply 'kills off' the process and you see some error such as you have. sad

They do offer some tool for looking at site usage.  Might be worth a look.

'spirit of sharing', Ken

 

 
Average of ratings: -
Picture of Daniel Lombardo
Re: Optimizing for Grade Import and stopping: "Timeout waiting for output from CGI script"
 

Hi Ken, I queried them about the Apache kills and they returned saying this (see below). I'm about to start testing it again and see if it resolves the issues I'm having.

"Thank you for contacting our Help Desk.

The logs you provided us with are generated from Apache itself.

According to the errors recorded there I have added the following lines in your .htaccess in order for Apache timeout to be extended dynamically. 


<IfModule mod_dtimeout.c>
<Files ~ ".php">
SetEnvIf Request_URI "index" DynamicTimeout=300
</Files>
</IfModule>

Please verify the result on your end."

 
Average of ratings: -