fix(mysql): fix connectors getting stuck in "connecting" state#15909
fix(mysql): fix connectors getting stuck in "connecting" state#15909savonarola wants to merge 8 commits intoemqx:release-586from
Conversation
| end; | ||
| false -> | ||
| ?status_connecting | ||
| {error, timeout} -> |
There was a problem hiding this comment.
Currently, in EMQX, MySQL driver is configured with infinity timeout.
So, if a tcp connection breaks ungracefully, any request (including health checks) just makes workers stuck.
The subsequent healthcheck requests also fail with timeout.
So in case of healthcheck timeout we report disconnected status to trigger reconnection.
There was a problem hiding this comment.
Strange that the mysql driver does not attempt to reconnect or die if the tcp connection breaks 🤔
There was a problem hiding this comment.
Its just a guess and an attempt to fix a problem of a concrete customer.
The thing is that the connection may break without any fin/rst packets, traffic just stops to arrive. A reconnect solves the problem, but the connector stucks in connecting state till the traffic unblocks.
| {grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.12"}}}, | ||
| {minirest, {git, "https://github.com/emqx/minirest", {tag, "1.4.4"}}}, | ||
| {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.6.1"}}}, | ||
| {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.6.1-hotfix"}}}, |
790524c to
c8eef2b
Compare
e81194b to
e7af46d
Compare
No description provided.