You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2018/08/14 23:27:15 UTC

[incubator-superset] branch master updated: [sql lab] always use NullPool (#5612)

This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new be04c98  [sql lab] always use NullPool (#5612)
be04c98 is described below

commit be04c98cd3a55aec9c9dd6d1457de5655ad20b30
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Tue Aug 14 16:27:13 2018 -0700

    [sql lab] always use NullPool (#5612)
    
    I think that the only place where we want db connection pooling would be
    to talk to the metadata database. SQL Lab should close its connections
    and never pool them.
    Given that each Gunicorn worker will create its own pool that can lead
    to way too many connections opened.
    
    closes https://github.com/apache/incubator-superset/issues/4666
---
 superset/sql_lab.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/superset/sql_lab.py b/superset/sql_lab.py
index b97761d..a659653 100644
--- a/superset/sql_lab.py
+++ b/superset/sql_lab.py
@@ -165,7 +165,7 @@ def execute_sql(
     try:
         engine = database.get_sqla_engine(
             schema=query.schema,
-            nullpool=not ctask.request.called_directly,
+            nullpool=True,
             user_name=user_name,
         )
         conn = engine.raw_connection()