-
Notifications
You must be signed in to change notification settings - Fork 44
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
Sync initial connection can cause *very* long waits #60
Comments
Seems to be this loop libasynql/libasynql/src/poggit/libasynql/libasynql.php Lines 137 to 139 in 50ac73e
Could make this async indeed. |
Yes, I used to have a plugin that attempt to reconnect the database every 5 minutes if the connection failed has on enable. And it really did make people think I'm running queries on main thread oof. |
Not sure if this is directly related but I'm seeing very long waits on close() as well.
1m 25s to close, the only thing called on disable is this: |
Describe the bug
During initial construction of the libasynql if you have a internet connection issue or DB issue you can expect waits of up to 3 minutes PER plugin that uses libasynql.
Sample code
Expected behavior
Smaller timeout or connection made async (not sure how its done backend)
Environment
OS: Windows 10
PocketMine version: 3.19.0
PHP: 8.0.3
Log
Take note of timestamps, if several plugins were to have libasynql and they all failed like above during initial connection that could be an extremely long wait before the user can interact with the server (stop command etc)
The text was updated successfully, but these errors were encountered: