You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/08/09 07:31:29 UTC

[GitHub] yyhpys edited a comment on issue #4666: Sessions still active on Datasource

yyhpys edited a comment on issue #4666: Sessions still active on Datasource
URL: https://github.com/apache/incubator-superset/issues/4666#issuecomment-411663732
 
 
   Hi. I confronted same issue while using superset 0.26.3 with postgresql in sync mode. Superset constantly creates new idle connection when I run query in sql lab. 
   
   https://github.com/apache/incubator-superset/blob/master/superset/sql_lab.py#L166 
   Every time i send query using sql lab, new engine instance is created(checked id of engine instance. it is not memoized.) with nullpool=False(since I ran query with sync option). So every time a new query is called, engine is created with default pool. Raw DBAPI connection created from engine may not be closed after query execution, instead it just releases back to its engine's pool. (http://docs.sqlalchemy.org/en/latest/core/connections.html#working-with-raw-dbapi-connections)
   
   I searched some histories to find out implementation background.
   https://github.com/apache/incubator-superset/blame/d3f55a0905e4aa7a2da22113ea8e25c174903c9f/superset/sql_lab.py#L48
   Looks like former implementations did not create engine in sync case. Is there any particular reason for creating new engine instance and not using NullPool in sync case?
   
   Sorry for my bad grammar.
   Thank you for great application.
   
   --+
   We are temporarily using gunicorn's max-requests option so that workers automatically recycles themselves with their idle connections.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org