altairbow / django-db-connection-pool

Database connection pool component library for Django
https://pypi.python.org/pypi/django-db-connection-pool/
MIT License
181 stars 24 forks source link

Got an error creating the test database: CREATE DATABASE cannot run inside a transaction block #16

Closed emrebayramc closed 3 years ago

emrebayramc commented 3 years ago

After I installed django-db-connection-pool all my tests started to fail like this:

Creating test database for alias 'default'...
2020-12-30 11:03:04,219 dj_db_conn_pool.core.mixins DEBUG    __no_db__'s pool has been created, parameter: {'pre_ping': True, 'echo': True, 'timeout': None, 'recycle': 3600, 'pool_size': 30, 'max_overflow': 30}
2020-12-30 11:03:04,222 dj_db_conn_pool.core.mixins DEBUG    got __no_db__'s connection from its pool
Got an error creating the test database: CREATE DATABASE cannot run inside a transaction block

2020-12-30 11:03:04,223 dj_db_conn_pool.core.mixins DEBUG    release __no_db__'s connection to its pool
2020-12-30 11:03:04,224 dj_db_conn_pool.core.mixins DEBUG    release default's connection to its pool

Any idea?

altairbow commented 3 years ago

Try to turn on AUTOCOMMIT

altairbow commented 3 years ago

no further deedback, closed.