I’m dealing with an external app integrated into Moodle via webservices. Their app syncs our course data via a Moodle API call of core_course_get_courses, but the sync is failing currently at about 5 minutes.
I’m trying to figure out why it’s failing and trying to test/debug the API call they use. The API requests all courses from Moodle along with some JSON parameterized data about each course. I find that if I set an option in the call to only get one or a few courses it works fine. But when it runs without options and tries to get all 24K courses in the system (yes we have a lot of courses going back 6+ years) it fails with a generic Error: read ECONNRESET
I’ve grepped the Apache logs and don’t see that error anywhere.
I can run the call on dev, which has a lot fewer courses, with no issues.
I’ve asked the vendor engineers if they could possibly use one of the other Moodle APIs that looks for a subset of courses but they have not been willing to switch that up on their end.
Other than that the issue seems to be related to the size of the response Moodle is processing I’m not sure how to troubleshoot…I don’t think it’s a timeout issue as that would be a different error (I think)…. I’ll look at some of the server tuning on dev to see if maybe I can recreate the error.
I'm on Moodle 3.6.10 on a self hosted LAMP cluster running CentOS 6.10 and PHP 7.0