The purpose of this article is to provide information in regards to receiving periodic DB connection Alerts in ScaleArc.
Why do I receive Periodic DB Connection failures in the Alert Log of my ScaleArc Instance?
Possible Reasons :
The Application library as well as the Servers are using MYSQL version 5.6.x. Each time an application fails to connect, the following Alert Log entry appears on the ScaleArc instance:
CID: 1, Client IP: 10.5.10.14, User: mstr, Debug_Code: 521, Message:
Closing connection ssid:133535;Cli:10.5.10.14:40291/DB:10.5.10.13 due to
unexpected external event, Reason:'Error in reading response / 5 byte
response read. (auth on case).,Advice:Check db server health / Take tcpdump
trace to debug if unexpected,debuginfo#14;rln:0:sok:0:e:0:Success#'; ,
State: -1, SSID: 133535, DB: MD, Type: 37
In this MYSQL version 5.6.x, there is additional data that is getting passed during login as well as during a change_user request sent by iDB.
The login packet that we send to the server is that of client, but the iDB's internal reset mechanims uses mysql_change_user command to reset the session variables while re-using a server connection from pool. Since , this is a custom packet created by iDB , it does not contain the additional data that is required to complete the change_user request. Due to this the change_user request is failing.
Pre 5.6.x (Below data was captured in a tcpdump)
Following is the new change_user packet format (Below data is captured in a tcpdump)
This has been resolved in following version of ScaleArc, and any versions after :
If you have any questions in regards to this article, please feel free to contact ScaleArc support at email@example.com or call us at 1-855-800-7225 (US Toll Free) or +1-408-412-7315 (Outside of the US)