Poco::Data::MySQL "Packet out of order" error
P粉037450467
P粉037450467 2024-03-28 15:50:04
0
1
458

When running a multi-threaded C application using Poco::Data::MySQL and Poco::Data::SessionPool, an ER_NET_PACKETS_OUT_OF_ORDER error occurs. The error message looks like this:

MySQL: [MySQL]: [Comment]: mysql_stmt_prepare error [mysql_stmt_error]: Got packets out of order    [mysql_stmt_errno]: 1156    [mysql_stmt_sqlstate]: 08S01    [statemnt]: ...

The application queries from multiple threads every 100 milliseconds. Connections are provided by the public SessionPool.

P粉037450467
P粉037450467

reply all(1)
P粉195402292

I solved this problem by adding reset=true to the connection string. However, as stated in the Official Documentation, adding this option may cause encoding issues.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template