DatabaseError: used with asynchronous query
I'm experiencing reproducible but seemingly random crashes using gevent (1.0.1) and psycogreen (psycogreen==1.0) with Django (1.8). I can reproduce this in a very simple Django with just one view which loads all models and does a count on them.
The view will crash with the following error: ProgrammingError: close cannot be used while an asynchronous query is underway
This occurs when if I make several concurrent requests to the view above by curl'ing it in a tight loop from two bash terminals to simulate load.
Any thoughts on this?
Comments (8)
-
repo owner -
reporter -
repo owner Sweet, thank you very much: I'll try and look into that.
-
reporter Any thoughts on this?
-
repo owner I'm out of town and won't be available to work on it for a few days. I'll check about the issue starting from next week.
-
reporter Hi there, any luck reproducing?
-
repo owner Sorry for the delay: I've given it a spin but for the moment couldn't reproduce the issue.
As data I've created 10K contexts and 10K events. I'm running "manage.py runserver" which I don't think is really concurrent. Is there anything obviously different from your setup?
-
I have same exceptions on gevent==1.0.2,sqlalchemy==1.0.8, psycopg2==2.6.1, postgresql 9.4.3. Actually it's rare for me (it happens one time in couple days on continually running daemon with simultaneously 10-30 db connections). I'll ty to update related libraries, if it would not help - try to make reproducable test and post it here, if this continues to happen.
- Log in to comment
Can you provide a project and a requirements.txt file to make easier to test the issue? Thank you.