denodrivers/mysql

Mysql timeout configurations not being respected

BayoKwendo opened this issue · 10 comments

I have been monitoring my deno mysql application for sometime now. Even though i included everything suggested for this driver , idletimout etc but my application keeps on disconnecting after idle for 10 minutes or more.,, i am just stuck and wondering why deno cant respect MySQL configurations.
And wait why cant you implement keep-alive function

More information is needed.

What are the value of MySQL server wait_timeout and the deno_mysql idleTimeout option?

Does deno_mysql connect to a remote MySQL server or a localhost one?
If connecting remotely, the TCP connection can be broken due to unstable network or router NAT timeout etc.
If it is the case, try setting idleTimeout to a lower value, 60000 (1 minute) for example.

I have set MySQL server timeout configurations to be 24 hours and idletimeot to be 3 hours. MySQL is hosted remotely. and still been experiencing this.

So I think there is some network problem between the client and the server.

You can set idleTimeout to 300000 (5 minutes) and see if the problem still persists.

I will consider implementing heartbeat packets in deno_mysql.

Great, lemme try,, heartbeat packet would be the best solution

Any hope for us.. the heartbeat thing?

Seems that there is no heartbeat in the protocol of MySQL.
Maybe using idleTimeout is the correct way.

ok but unfortunately idleTimout is not being respected also. I have test and test all with the same result after 10 minutes "connection closed"

@BayoKwendo
Is there "connection idle timeout" before "connection closed"?

It varies, sometimes it say closed unexpectedly, sometime connection idle timeout then connection closed

Can't reproduce the problem. Close it for now.