Usind duckdb for coderunner python3 question

Usind duckdb for coderunner python3 question

von Felix Di Lenarda -
Anzahl Antworten: 2

We have received a request regarding the use of DuckDB for Python3 questions in CodeRunner. I have installed DuckDB (version 0.9.2) on the Jobe server. 

When trying to connect to a DuckDB database through a Moodle question, 

>>> import duckdb
>>> connect = duckdb.connect()

we encounter the following error:

"Resource temporarily unavailable error"

The db-connection works fine when tested directly on the server, even when tested under the jobe00 user (su -s /bin/bash jobe00).

Does anyone have a tip on what could be causing this error or where I should look?



Als Antwort auf Felix Di Lenarda

Re: Usind duckdb for coderunner python3 question

von Richard Lobb -
Jobs on Jobe are run under the control of a module called runguard, which restricts resources. I've seen that particular error when a fork failed because the limit on the number of processes has been reached, or there wasn't enough memory for the forked process. The latter sounds the most likely in your case. To check, edit your test CodeRunner question, click the Customise checkbox and enter 0 into the memory limit (MB) box. That turns off the memory limit.
Showing advanced customisation

If that works, experiment to find a good safe value. [You need some sort of limit to prevent processes gobbling all of memory, although they will be thrown out when the timelimit is reached, regardless.]

If it doesn't work, also set the Parameters field in that panel to something like

{"numprocs": 1000}
which allows up to 1000 processes (a ridicuously large number). Again, if it works experiment to find a reasonably safe limit.
Als Antwort auf Richard Lobb

Re: Usind duckdb for coderunner python3 question

von Felix Di Lenarda -
Thanks a lot Robert! :D
The "numprocs" Parameter has done the trick.
Greetings Felix