I'm developing a django web app and i have notice something strange. The following query will stay in execution in the DB
SELECT "django_migrations"."app", "django_migrations"."name" FROM "django_migrations"
here the example from: select query_start,state_change,waiting,state,query from pg_stat_activity;
test6=> select query_start,state_change,waiting,state,query from pg_stat_activity;
query_start | state_change | waiting | state | query
-------------------------------+-------------------------------+---------+--------+--------------------------------------------------------------------------------------------------
2017-06-21 16:02:21.926337+02 | 2017-06-21 16:02:21.926402+02 | f | idle | SELECT "django_migrations"."app", "django_migrations"."name" FROM "django_migrations"
untill stop the "runserver"
Current settings:
- Django 1.11.2
- PostgreSQL 9.2.17
- Using Django ORM only
- All migrations were applied
- CONN_MAX_AGE setted in settings.py
Why Django doesn't close the connection after the query execution?