Skip to content

Commit

Permalink
[sql lab] always use NullPool (apache#5612)
Browse files Browse the repository at this point in the history
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 apache#4666
  • Loading branch information
mistercrunch authored Aug 14, 2018
1 parent 2171ffb commit be04c98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/sql_lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def handle_error(msg):
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()
Expand Down

0 comments on commit be04c98

Please sign in to comment.