[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
This commit is contained in:
Maxime Beauchemin 2018-08-14 16:27:13 -07:00 committed by GitHub
parent 2171ffb630
commit be04c98cd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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()