Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For each query execution a new connection is opened #152

Open
willyrgf opened this issue Nov 21, 2020 · 2 comments
Open

For each query execution a new connection is opened #152

willyrgf opened this issue Nov 21, 2020 · 2 comments

Comments

@willyrgf
Copy link

I'm running the SQL Tabs v1.1.0, the last release to MacOSX Catalina (10.15.7) and for each query execution for both MySQL and PostgreSQL databases the SQL Tabs open a new connection, in some time I reach the limit of max_connection of the database and drop down all application using that database.

Anyone have same problem?

I like too much of this sql client, but I don't programming in JS to debug and fix that.

Thanks

@sasha-alias
Copy link
Owner

Hi, SQL Tabs opens a connection for each tab, plus it opens one more connection per unique connection string for fetching autocompletion metadata. I think it doesn't open connectoin for each query, it would be too much.
Probbably the issue is it doesn't close a connection when a tab get closed. So when you open and close tabs pretty often you might run out of max_connections. That's true. I will take a look how to fix it, but for the moment I would suggest to reuse existing tabs rather than open and close new ones.

@willyrgf
Copy link
Author

Hi there, I made a lot of tests and in my test I could understand that:

  • Using a MySQL 5.6, if I use the password in the connection string (mysql://user:[email protected]), the SQL Tabs open a new connection for each query;
  • In the same envorinment if I don't put the password in the connection string (mysql://[email protected]), and type the password when asked, the SQL Tabs only open one connection per tab, like you say;

Maybe you can reproduce that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants