Skip to content

SSH Tunneling is quite slow #41745

Description

@dawagner

Bug description

My users were reporting that dashboards were taking a long time to load. It seems that for each SQL query, Superset open a new SSH connection. That can be quite costly and can even trigger rate-limiting or rejection from the ssh server.

I added a side-car container using autossh to my setup, removed tunneling from the database connection parameters and pointed the database connections to that container instead of the actual database. My "cache warmup" periodic task went from 10 minutes to 3 minutes and users report a day-and-night difference. In addition, the logs are much more readable now :)

Could the tunneling implementation be improved by pooling the ssh connection across requests?

(I'm using Superset 5.0.0 but I mentioned Superset 6.0.0 in the bug details because that was the closest available option)

Screenshots/recordings

No response

Superset version

6.0.0

Python version

I don't know

Node version

I don't know

Browser

Not applicable

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    #bug:performancePerformance bugsdata:databasesRelated to database configurations and connections

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions