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

Handle Error dropping existing table Error: connect ECONNREFUSED -- interface hang ups #159

Open
acrosman opened this issue May 9, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@acrosman
Copy link
Owner

acrosman commented May 9, 2022

Describe the bug
Under some conditions the database may refuse connections, particularly with newly enlarged pool in 0.7.0. That can result in a response of Error dropping existing table Error: connect ECONNREFUSED during database creation. Currently that causes the loading spinner to continue running indefinitely as it waits for any effected objects to complete.

To Reproduce
Steps to reproduce the behavior:

  1. Find or build a schema with more objects than the database instance allows connections (select all will probably do it for most use cases).
  2. Create the database.
  3. The process will stop at some portion of completion without updating notifying the user that it has failed to finish.

Expected behavior
A complete database. Also any error during processing should result in an error message not a hung process. All errors that are related to a table creation failure should name the involved table.

Desktop (please complete the following information):

  • OS: Windows
  • Target Database: MariaDB

Additional Context
This is almost certainly caused by the connection pool size now being the same as the number of tables. That was added in 0.7.0 to deal with timeouts from the pool being too small on slower servers in part because Knex uses a table alter to add indexes instead of doing it during create. We'll need a new approach to how this is handled.

Thoughts:

  1. Is there a way to determine connection limit easily or guess a reasonable pool size when we cannot?
  2. When we have more items than will fit in the connection pool we risk a time out if a specific table isn't added to the pool fast enough, so we need a new queuing mechanism to wait until there is room to run the process. Used to be that the creation was sequential which was reliably but very slow. If we can't create a good queuing solution we can do that again, but it's less than ideal.
@acrosman acrosman added the bug Something isn't working label May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant