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

Course Scan Runs Indefinitely #713

Closed
ghost opened this issue Nov 11, 2021 · 9 comments
Closed

Course Scan Runs Indefinitely #713

ghost opened this issue Nov 11, 2021 · 9 comments
Labels

Comments

@ghost
Copy link

ghost commented Nov 11, 2021

When the course menu item for UDOIT is first clicked, it takes a very long time for the program to appear, perhaps 20 to 30 seconds or so. I attribute this to the fact that it is contacting the Heroku server and may have to spool up. However, once it does appear users see the message "UDOIT is scanning the course content for accessibility issues..." This process seems to go on forever regardless of the size of the course. I have had it run for more than 30 minutes on a course that had very little content. If after a period of time I exit the course and re-enter it and click on UDOIT one of two things will happen 1) it will run a brief scan and then the results will appear or 2) it will start scanning again and continue scanning like it was the first time. I am curious as to why the initial scan seems to take forever and does not complete.

@bagofarms
Copy link
Member

Unfortunately, we're unable to replicate the infinite scanning issue on our end. Do you see anything in the Heroku logs? You can view them by viewing the settings of your Heroku instance, then clicking on "More->View Logs" in the top right.

@ghost
Copy link
Author

ghost commented Nov 12, 2021 via email

@bagofarms
Copy link
Member

After doing some research and testing, this issue appears to be a result of our new broken and redirected link detection. Since it's not possible to increase the maximum execution time beyond 30 seconds on Heroku, here is our plan for solving this:

  1. Issue a hotfix that disables the broken and redirected link checker.
  2. Add the ability to enable/disable the broken and redirected link checker either through .env.local or the Heroku app settings. It would be disabled by default for Heroku.
  3. Implement a background worker that would handle all course scanning activity, since Heroku has much longer timeouts for workers.

@bagofarms bagofarms added the bug label Nov 15, 2021
@ghost
Copy link
Author

ghost commented Nov 16, 2021 via email

@bagofarms
Copy link
Member

3.1.1 is released. Please try it out on Heroku to see if it fixes your issue. You can set up a new Heroku instance by clicking the Heroku button. If you have the code downloaded to your machine via Git, you can update your existing Heroku instance of UDOIT 3.1.0 by pushing the main branch to your Heroku's master branch.

If you would like to try UDOIT 2.8.3, you can click the Heroku button in the classic branch.

@ghost
Copy link
Author

ghost commented Nov 17, 2021 via email

@bagofarms
Copy link
Member

Closing in favor of the worker feature request issue.

@jh246118
Copy link

jh246118 commented Feb 24, 2022

I've recently deployed the latest version 3.1.1 and am running into this issue where some courses are scanning indefinitely. No issues with smaller courses but am running into the execution time out with larger courses

Log Sample:

2022-02-24T22:19:20.932583+00:00 app[web.1]:
2022-02-24T22:19:20.932684+00:00 app[web.1]: [24-Feb-2022 22:19:20] [pool www] pid 113
2022-02-24T22:19:20.932754+00:00 app[web.1]: script_filename = /app/public/index.php
2022-02-24T22:19:20.932926+00:00 app[web.1]: [0x00007f091dc13a90] curl_multi_select() /app/vendor/symfony/http-client/Response/CurlResponse.php:351
2022-02-24T22:19:20.933096+00:00 app[web.1]: [0x00007f091dc139b0] select() /app/vendor/symfony/http-client/Response/TransportResponseTrait.php:296
2022-02-24T22:19:20.933261+00:00 app[web.1]: [0x00007f091dc7d8c0] stream() /app/vendor/symfony/http-client/Response/CommonResponseTrait.php:156
2022-02-24T22:19:20.933436+00:00 app[web.1]: [0x00007f091dc13910] initialize() /app/vendor/symfony/http-client/Response/TransportResponseTrait.php:65
2022-02-24T22:19:20.933548+00:00 app[web.1]: [0x00007f091dc138a0] getHeaders() /app/src/Lms/LmsResponse.php:85
2022-02-24T22:19:20.933671+00:00 app[web.1]: [0x00007f091dc13800] setResponse() /app/src/Lms/Canvas/CanvasApi.php:54
2022-02-24T22:19:20.933785+00:00 app[web.1]: [0x00007f091dc136d0] apiGet() /app/src/Lms/Canvas/CanvasLms.php:190
2022-02-24T22:19:20.933927+00:00 app[web.1]: [0x00007f091dc13520] updateCourseContent() /app/src/Services/LmsFetchService.php:83
2022-02-24T22:19:20.934066+00:00 app[web.1]: [0x00007f091dc13460] refreshLmsContent() /app/src/Controller/SyncController.php:44
2022-02-24T22:19:20.934212+00:00 app[web.1]: [0x00007f091dc13340] requestSync() /app/vendor/symfony/http-kernel/HttpKernel.php:157
2022-02-24T22:19:20.934351+00:00 app[web.1]: [0x00007f091dc13260] handleRaw() /app/vendor/symfony/http-kernel/HttpKernel.php:79
2022-02-24T22:19:20.934481+00:00 app[web.1]: [0x00007f091dc131b0] handle() /app/vendor/symfony/http-kernel/Kernel.php:195
2022-02-24T22:19:20.934576+00:00 app[web.1]: [0x00007f091dc130f0] handle() /app/public/index.php:25
2022-02-24T22:19:42.080497+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/api/sync/3" host=sccprod-udoit-canvas.herokuapp.com request_id=62ae8788-75b0-4b6b-bb21-50d65611766e fwd="64.89.52.22" dyno=web.1 connect=0ms service=30001ms status=503 bytes=0 protocol=https
2022-02-24T22:19:47.954902+00:00 app[web.1]: [24-Feb-2022 22:19:47] WARNING: [pool www] child 113, script '/app/public/index.php' (request: "GET /index.php") execution timed out (30.221667 sec), terminating
2022-02-24T22:19:48.955926+00:00 app[web.1]: [24-Feb-2022 22:19:48] WARNING: [pool www] child 113, script '/app/public/index.php' (request: "GET /index.php") execution timed out (31.222752 sec), terminating
2022-02-24T22:19:49.957169+00:00 app[web.1]: [24-Feb-2022 22:19:49] WARNING: [pool www] child 113, script '/app/public/index.php' (request: "GET /index.php") execution timed out (32.223853 sec), terminating
2022-02-24T22:19:50.958110+00:00 app[web.1]: [24-Feb-2022 22:19:50] WARNING: [pool www] child 113, script '/app/public/index.php' (request: "GET /index.php") execution timed out (33.224924 sec), terminating
2022-02-24T22:19:51.715231+00:00 app[web.1]: 10.1.53.33 - - [24/Feb/2022:22:19:12 +0000] "GET /api/sync/3 HTTP/1.1" 500 831 "https://sccprod-udoit-canvas.herokuapp.com/dashboard?auth_token=97f7f8b8-5b8d-4f50-87f6-0b3d85c1db61" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36

The network logs are showing a 503 (service Unavailable) error:

image

image

I'm not quite sure where to go with this since it works in some courses but not others.

I will add that I used the 'deploy to Heroku' button from the main page and followed the install instructions in HEROKU.md and INSTALL_Canvas_md

@bagofarms
Copy link
Member

It looks like you're experiencing the same issue as the original poster. It is still our plan to implement a worker for Heroku, which will be the solution to this problem

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

No branches or pull requests

2 participants