maths / moodle-qtype_stack

Stack question type for Moodle
GNU General Public License v3.0
138 stars 147 forks source link

CAS failed to return any data due to timeout #1103

Closed DissonantSynth closed 5 months ago

DissonantSynth commented 5 months ago

Hello to the devs and maintainers. I have an issue that I hope I'll be able to get assistance with.

I just installed STACK for the first time without issues. I enabled all the necessary PHP features, and all the extra dependencies were successfully installed. During my experimentation, I've been unable to successfully create and save any STACK question, however.

The error that keeps plaguing me is "CAS failed to return any data due to timeout.", and is displayed for the input model answer field. Note that I have no question variables. Changing the "CAS connection timeout" value (qtype_stack | castimeout) unfortunately doesn't resolve the problem; nor does changing the Maxima version.

I'm using Moodle 4.3.2 (Build: 20231222) on a Linux server with PHP 8.2. Furthermore, I'm using STACK 4.5.0 for Moodle 3.9+

Thank you very much for your time.

sangwinc commented 5 months ago

I've encountered this problem occasionally depending on which version of Maxima you have. The very first time Maxima runs on the server it loads a lot of text-based lisp code and compiles this on the server. That's all perfectly normal. STACK uses the "timeout" and if this is too low this crucial first execution will not finish. If you can, first load Maxima on the command line and execute a non-trivial command (e.g. diff(x^2/(1+x^2), x); then quit(); ) Then up the timeout on the plugin page and try again. If this works you can return the timeout to a lower level in production. If this does not work, follow these docs: https://docs.stack-assessment.org/en/Installation/Testing_installation/#troubleshooting-an-installupgrade

I think this is a local problem, not a plugin issue so I'll close this issue on this tracker. If you still have problems email me at Edinburgh: C.J.Sangwin@ed.ac.uk and I'll try to help. Chris