apluslms / gitmanager

Git manager service for A+. Separated from the MOOC-Grader.
0 stars 6 forks source link

Opening a model solution fails if the course has not been loaded to the cache yet #18

Open markkuriekkinen opened 2 years ago

markkuriekkinen commented 2 years ago

If a course is not yet loaded in the gitmanager cache, then when a user opens a model solution in the A+ front, loading the model solution to A+ fails. Does gitmanager crash or just time out when loading the course takes several seconds?

This occurred at least in the O1 course after the server upgrade (v1.15 June 2022).

lainets commented 2 years ago

This is due to the request timing out as the loading of a config takes around 9 seconds on O1. I believe NGINX is what times out the request but it may also be A+. The only 'real' solution would be to load the configs on start up. The time out could also be increased in NGINX/A+ but that only works as long as the config loading time doesn't increase (e.g. due to a larger course).

This is also quite a rare situation as it only happens if the cache is cleared (i.e. restarted) and the config hasn't been loaded yet (i,e, the course hasn't been accessed in any way).