-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tasks that run Django queries mostly fail with "connection already closed" #21
Comments
Oops I think this was just caused by another uwsgi running the same project in the background. |
Alright I'm officially stumped. I found that other copy of uwsgi running, stopped it and my problems disappeared. I then updated all my packages (Django 4.2.1 to 4.2.5) and the problem has reappeared. I've confirmed I don't have multiple UWSGI's running. I have no idea where to look here... I have a similar project running similar code on 4.2.5 as well without issue... |
Hi, it looks like the issue related to db connection management, a single connection to a db is shared between your main application process and spooler process(es) and when your main application closes the connection - spooler fails since the connection is closed. Here are couple workarounds which could be considered:
|
I have a working Django 4.0 project. My Django 4.2 project will error out on almost any basic query that uwsgi-tasks runs.
With this code it simply is failing to run
obj, created = Task.objects.get_or_create(id=task_id)
.Any tips as to what could cause this? Is it simply me running a newer version of Django or is something else going on?
Here is the error output.
The text was updated successfully, but these errors were encountered: