antares-sql / antares

A modern, fast and productivity driven SQL client with a focus in UX
https://antares-sql.app
MIT License
1.6k stars 111 forks source link

[MariaDB / MySQL] Error: Can't add new command when connection is in closed state #820

Open SmileYzn opened 6 days ago

SmileYzn commented 6 days ago

Describe the bug After a idle time, the Antares SQL give this error when execute a query in a query tab: Error: Can't add new command when connection is in closed state

That can occur in MySQL, MariaDB (That was i tested) and in different hosting providers.

Also occur the error when i disconnect and reconnect to server manually TypeError: Cannot read properties of null (reading 'includes')

To Reproduce

  1. Open a new query tab
  2. Execute an query
  3. Wait 30~60 seconds or some more time
  4. Error appears

Expected behavior The connection must be still open for new query execution

Screenshots

Screenshots attached here, click to open ![Screenshot](https://github.com/antares-sql/antares/assets/5851851/792b4cb2-3ef3-4afd-9435-76a020d125b3) ![image](https://github.com/antares-sql/antares/assets/5851851/8d574f62-5120-4ba1-ad58-5147d035554e)

Application (please complete the following information):

Environment (please complete the following information):

Additional context That can occurs in MariaDB, MySQL server from different versions and in other hosts too. Also do not matter if i use Single Connection mode or not in server connect options.

Thanks again for Antares SQL Application :pray:

D-nov commented 1 day ago

Just stumbled upon this fun error (again), so here's some more info to it:

ENV:

Steps:

Actual results:

BUT it somehow works fine when used over ssh. Similar setup, different environment.