Skip to content

"idle in transaction" connection #3260

@silenius

Description

@silenius

CKAN Version if known (or site URL)

2.5.2, full venv below:

(ckan_bbpf) www2# pip freeze -l
Babel==0.9.6
Beaker==1.7.0
bleach==1.4.2
certifi==2016.8.31
-e git+https://github.com/ckan/ckan.git@919201e886fa95c8f26b9d970cb9ef7bbb916ca9#egg=ckan
decorator==4.0.4
fanstatic==0.12
FormEncode==1.3.0
Genshi==0.6
html5lib==0.9999999
Jinja2==2.6
Mako==1.0.2
Markdown==2.4
MarkupSafe==0.23
nose==1.3.7
ofs==0.4.1
ordereddict==1.1
Pairtree===0.7.1-T
passlib==1.6.2
Paste==1.7.5.1
PasteDeploy==1.5.2
PasteScript==2.0.2
pbr==0.11.0
psycopg2==2.4.5
Pygments==2.0.2
Pylons==0.9.7
python-dateutil==1.5
pytz===2012j
pyutilib.component.core==4.5.3
repoze.lru==0.6
repoze.who==2.0
repoze.who-friendlyform==1.0.8
requests==2.7.0
Routes==1.13
simplejson==3.3.1
six==1.10.0
solrpy==0.9.5
SQLAlchemy==0.9.6
sqlalchemy-migrate==0.9.1
sqlparse==0.1.11
Tempita==0.5.2
tzlocal==1.2
unicodecsv==0.14.1
vdm==0.13
WebError==0.11
WebHelpers==1.3
WebOb==1.0.8
WebTest==1.4.3
zope.interface==4.1.1

Please describe the expected behaviour

No idle in transaction connection for more than a few seconds.

Please describe the actual behaviour

Any connection in the state idle in transaction for more than a few seconds usually indicates a problem with the application:

postgres=# select backend_start, xact_start, query_start, state_change, waiting, state, query from pg_stat_activity where datname='ckan_bbpf' and state = 'idle in transaction';
-[ RECORD 1 ]-+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
backend_start | 2016-09-21 16:06:59.026356+02
xact_start    | 2016-09-21 16:06:59.826694+02
query_start   | 2016-09-21 16:06:59.872203+02
state_change  | 2016-09-21 16:06:59.872341+02
waiting       | f
state         | idle in transaction
query         | SELECT system_info.id AS system_info_id, system_info.key AS system_info_key, system_info.value AS system_info_value, system_info.state AS system_info_state, system_info.revision_id AS system_info_revision_id 
              | FROM system_info 
              | WHERE system_info.key = 'ckan.main_css' 
              |  LIMIT 1

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions