Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Increase default apitimeout setting and make debugging failed uploads easier #48

Closed
JPT580 opened this issue Apr 7, 2022 · 3 comments · Fixed by Opencast-Moodle/moodle-block_opencast#289 or #55

Comments

@JPT580
Copy link

JPT580 commented Apr 7, 2022

We just stumbled upon an issue while trying out one of your latest plugin versions that ships with a 2000 millisecond apitimeout by default.
I understand that you want to keep this to a minimum for regular requests that occur during page loads in order to not keep the users waiting.

However, this broke our video upload cronjob, because our opencast test instance takes way more than 2 seconds to respond to that particular POST request.
Since the video upload itself was successful, the new video was added into the opencast series while Moodle still thought that the upload did not succeed. This leads to moodle uploading the same video over and over again and again until an admin breaks this cycle.

It took us a bunch of time debugging this, that's why I am sharing this here.
Please consider increasing the default apitimeout to 30 seconds or consider using a different timeout for the video upload cronjob.
Also, perhaps it is a good idea to improve logging errors that occur while uploading a video, so that we don't have to add our own print_r() statements in order to figure out the actual cause for a failed upload. :-)

@jojoob
Copy link
Contributor

jojoob commented May 25, 2022

This was indeed introduced by #42

I will provide a patch but not sooner than mid June. Meanwhile, increasing the value for the apitimeout setting helps.

@joneug
Copy link

joneug commented Jun 28, 2022

I would prefer to have an additional timeout setting for video upload requests within the cronjob. We had to increase the timeout to values even greater than 30 seconds. Such long timeouts are of course not necessary for, e.g., requests just fetching metadata from Opencast.

@jojoob
Copy link
Contributor

jojoob commented Jul 8, 2022

I decided to implement an extra setting in block_opencast for a dedicated upload timeout. I did this because the upload functionality is implemented there and not in tool_opencast. #54 only creates the conditions for the feature in block_opencast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants