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

Packets out of order #101

Closed
ZoumiSurGithub opened this issue Jul 21, 2023 · 5 comments
Closed

Packets out of order #101

ZoumiSurGithub opened this issue Jul 21, 2023 · 5 comments

Comments

@ZoumiSurGithub
Copy link

ZoumiSurGithub commented Jul 21, 2023

Describe the bug
It seems to happen when there hasn't been any requests for a while and then suddenly there are a lot.

Error on console:
Fatal error: Uncaught ErrorException: Packets out of order. Expected 1 received 0. Packet size=145 in /home/zoumi/kitmap/plugins/Network/src/poggit/libasynql/mysqli/MysqliThread.php:96
Stack trace:
#0 [internal function]: pocketmine\errorhandler\ErrorToExceptionHandler::handle(2, 'Packets out of ...', '/home/zoumi/kit...', 96)
#1 /home/zoumi/kitmap/plugins/Network/src/poggit/libasynql/mysqli/MysqliThread.php(96): mysqli->ping()
#2 /home/zoumi/kitmap/plugins/Network/src/poggit/libasynql/base/SqlSlaveThread.php(86): poggit\libasynql\mysqli\MysqliThread->executeQuery(Object(mysqli), 1, 'UPDATE players\n...', Array)
#3 phar:///home/zoumi/kitmap/PocketMine-MP.phar/src/thread/CommonThreadPartsTrait.php(96): poggit\libasynql\base\SqlSlaveThread->onRun()
#4 [internal function]: pocketmine\thread\Thread->run()
#5 {main}

Sample code

Expected behavior

Environment
OS: Debian 11
PocketMine version: 5.3.2

@SOF3
Copy link
Member

SOF3 commented Jul 23, 2023

Basically poor error handling of libasynql. Duplicate of #85.

@SOF3 SOF3 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 23, 2023
@ZoumiSurGithub
Copy link
Author

Basically poor error handling of libasynql. Duplicate of #85.

but after a while, the data is no longer saved, so how can I force the connection to mysql again? and redo the previous queries?

@SOF3
Copy link
Member

SOF3 commented Jul 25, 2023

libasynql doesn't do anything with your data. if the query was successful initially, its durability it's the responsibility of MySQL unless you deleted the data.

@ZoumiSurGithub
Copy link
Author

let me explain, after a while I get an error with the ping, and it doesn't want to resume the connection with the server until I restart the server, which causes me to lose data, or maybe it's the waitAll I'm doing that's causing this.

@SOF3
Copy link
Member

SOF3 commented Jul 25, 2023

Yeah, poor error handling in libasynql, let's track this in #85.

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