Yes, one separate connection per request, the strange thing is that the problem disappears when I run it in parallel from 2 mclient instances. After doing that, my python code also works without problems.
On 13 Jul 2020, at 10:08 AM, Sjoerd Mullender
wrote: Are you using two separate connection instances in the Python code? The Python code cannot deal with multiple threads using the same connection.
On 10/07/2020 15.09, Ioannis Foufoulas wrote:
Hi,
I have a weird error when I am sending the following queries in parallel from 2 different python clients with MAPI:
insert into table1 select numpy_count(c1) as c1 from view; insert into table2 select numpy_count(c1) as c1 from view2;
where numpy_count is:
CREATE or replace AGGREGATE numpy_count(val INTEGER) RETURNS INTEGER LANGUAGE PYTHON { import time time.sleep(3) return val.size };
The error is: pymonetdb.exceptions.OperationalError: GDK reported error: GDKreleasesem: semctl failed: Invalid argument
However, if I run these 2 queries in parallel from 2 instances of mclient they work and AFTER doing this, they also work from python’s client with mapi. Is there any hint on this?
Best, Yannis
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- Sjoerd Mullender _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list