Details
-
Type:
Bug
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 3.9.3
-
Fix Version/s: None
-
Component/s: Web Services
-
Labels:None
-
Affected Branches:MOODLE_39_STABLE
Description
I'm noticing strange errors on a site running Moodle 3.9.3 (same on 3.9.2):
when doing a request to /lib/ajax/service.php the request body is sometimes returned back in the response:
shell ~> curl 'https://moodle.site/lib/ajax/service.php?sesskey=aGlK3DBfsg&info=core_course_get_enrolled_courses_by_timeline_classification' \ |
-H 'authority: moodle.site' \ |
-H 'pragma: no-cache' \ |
-H 'cache-control: no-cache' \ |
-H 'accept: application/json, text/javascript, */*; q=0.01' \ |
-H 'dnt: 1' \ |
-H 'x-requested-with: XMLHttpRequest' \ |
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36' \ |
-H 'content-type: application/json' \ |
-H 'origin: https://moodle.site' \ |
-H 'sec-fetch-site: same-origin' \ |
-H 'sec-fetch-mode: cors' \ |
-H 'sec-fetch-dest: empty' \ |
-H 'referer: https://moodle.site/my/' \ |
-H 'accept-language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7' \ |
-H 'cookie: MoodleSession=kncmpvb40a9h7pfvrmbsd9mnpk' \ |
--data-binary '[{"index":0,"methodname":"core_course_get_enrolled_courses_by_timeline_classification","args":{"offset":0,"limit":0,"classification":"all","sort":"ul.timeaccess desc","customfieldname":"","customfieldvalue":""}}]' \ |
--compressed
|
[{"index":0,"methodname":"core_course_get_enrolled_courses_by_timeline_classification","args":{"offset":0,"limit":0,"classification":"all","sort":"ul.timeaccess desc","customfieldname":"","customfieldvalue":""}}][{"error":false,"data":{"courses":[],"nextoffset":0}}] |
This leads to JSON parse errors on many pages and the site gets basically unusable.
Restarting php-fpm (I tested 7.3 and 7.4, both exhibit this problem) helps for a while, but the error appears again after some time. This is my first bug report, so please help me to give you all the information you need.
The server is running php-fpm 7.4 and nginx 1.19.