-
Notifications
You must be signed in to change notification settings - Fork 2k
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
"idle in transaction" connection #3260
Comments
Is this as simple as adding |
I haven't had time to dig yet, but I think so. If I remember correctly (but I may be wrong) in Pylons the SQLAlchemy session is "removed" only in the context of an HTTP request, so I think that an explicit .commit() or (.rollback()) should be made if the session is used outside of an HTTP request, otherwise it is idling forever (...and prevent |
I'm having the same problems, my CKAN loads dataset pages extremely slowly. My setup is a datacats & CKAN 2.6.0a (docs). Some observations:
shows db queries involving revisions taking a long time:
Is this likely the same problem you're having, @silenius ? |
Thanks @TkTech, will do! |
@florianm: we don't have any performance issues .. but our dataset is quite small. The If the performance issue is on the PostgreSQL side a first step would be to log slow queries and paste an |
Added pull request #3324 I checked more closely, when this connection appears. And instead of adding Session.commit in few places, i've just added it in the end of load environment function, so possibility of regression is reduced for feature changes |
CKAN Version if known (or site URL)
2.5.2, full venv below:
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:The text was updated successfully, but these errors were encountered: