MySql 8 MySQLConnectionHandler Fatal error: unhandled packet:
oprisk opened this issue · 3 comments
MySql 8 Error:
MySQLNIO/MySQLConnectionHandler.swift:89: Fatal error: unhandled packet: ByteBuffer ......
Xcode running the Vapor server and after about 12 hours, overnight, without connection activity, crashes with the above error message. See the attached error message snippet.
To Reproduce
The vapor server connected to LAN MySql 8 server on Mac OSX 12.6,
OSX Vapor server:
MySql 8 server
Xcode running the Vapor server and after about 12 hours, overnight, without connection activity, crashes with the above error message. See the attached error message snippet.
see attached snippets
Steps to reproduce the behavior:
- Add package with configuration '...'
- Send request with options '...'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
The MySql 8 server is running continuously. The vapor app connects as necessary to the MySql 8 server, residing in another osx server on the same network (subnet). After maybe 12 hours, overnight, the Vapor server crashes with the above error.
- My suspicion is that the vapor connection should be released after a timeout (maybe 30min).
- Is the Vapor Server receiving a query from the MySql 8 server?
- Is there an issue if MySql 8 server is inactive for 12 hours?
Environment
There is nothing special about the environment, standard, only setting is the working directory.
- Vapor Framework version: 4.69.2
- Vapor Toolbox version:
- OS version: Ventura 13.3
Apple MacStudio
M1 Max
Additional context
A quick decode of the raw packet bytes from the unhandled packet shows it to be an ERR_Packet
with the message that the client was disconnected due to idle timeout* (exceeded the length of the server's wait_timeout
setting, which defaults to 8 hours). This is a known issue with MySQLNIO's connection handling and will be addressed by the code rewrite currently in progress.
* The error packet contained error code 0xfbf (4031)
ER_CLIENT_INTERACTION_TIMEOUT
, SQL state #HY000
, and the message:
The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior.