Open augustolima opened 5 months ago
Hello, can you paste your database settings?, it's the first time I see this error and there are some projects using this package, so I'm not sure if geventpool is the root cause.
Also, try using latest, if posible, psycopg2==2.9.9 and django-db-geventpool==4.0.2
Hello, @jneight. Thanks for answering.
Here's the database settings:
DATABASE_URL = os.environ.get("DATABASE_URL")
DATABASES = {
"default": dj_database_url.parse(
DATABASE_URL,
engine="django_db_geventpool.backends.postgresql_psycopg2",
),
}
DATABASES["default"]["ATOMIC_REQUESTS"] = True
DATABASES["default"]["OPTIONS"] = {"MAX_CONNS": 60}
Regarding updating to psycopg2
and django-db-geventpool
, both have been updated and the error persists.
We have two tasks running at the same time on AWS ECS.
I think the problem is with ATOMIC_REQUEST=True, can you try with the latest release and with that setting True and False?
Hello guys...
I'm currently working on a legacy codebase with the following configuration:
And, since last week's deployment, we have been experiencing the following error, randomly, in all of our endpoints:
Psycopg2.ProgrammingError: set_session cannot be used inside a transaction
When checking the bug report, I can see that it breaks in the following piece of code:
Could the issue be related to this library/subdependency or Django subdependency?
EDIT 1: We rolled back to the previous version, and the error seems to persist.