ubc / iPeer

Peer Evaluation System
http://ipeer.ctlt.ubc.ca
Other
17 stars 18 forks source link

Canvas group sync timeout #599

Open kitsook opened 5 years ago

kitsook commented 5 years ago

When there are too many iPeer groups (600+) already defined and try to import more groups from Canvas, the request will timeout and the user will be presented with a blank page. New groups are created but members are not assigned to the groups.

The error log contains timeout messages, e.g.

2018/10/26 11:45:51 [error] 27058#27058: *549610 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /www_data/html/cake/libs/model/datasources/dbo_source.php on line 1045" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: xxx.ubc.ca, request: "POST /groups/import/yyyy/canvas HTTP/1.0", upstream: "fastcgi://127.0.0.1:9001", host: "xxx.ubc.ca", referrer: "https://xxx.ubc.ca/groups/import/yyyy/canvas"

Seems that a recursive DBO function from CakePHP ran for too long and caused a timeout. Besides performance tuning, consider to increase the max_execution_time in PHP.ini

Reference: PRB0044190