Bug #69484 DotNet connector keepalive in milliseconds instead of seconds
Submitted: 15 Jun 2013 13:41 Modified: 1 May 2014 20:31
Reporter: Michiel Hazelhof Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:6.6.5 & 6.7.4 & 6.8.4 OS:Windows
Assigned to: Francisco Alberto Tirado Zavala CPU Architecture:Any
Tags: keepalive, milliseconds, SECONDS

[15 Jun 2013 13:41] Michiel Hazelhof
Description:
In the documentation for the dotnet connector it says the following about the "Keepalive" connection property: "For TCP connections, idle connection time measured in seconds, before the first keepalive packet is sent. A value of 0 indicates that keepalive is not used".

However when using wireshark to monitor the connection it appears to actually be interpreted as milliseconds. (multiplying by 1000 shows a correct behavior in wireshark).

How to repeat:
Create a connection string with e.g. Keepalive=100; open the connection and start wireshark with some filter like "(tcp.dstport == 3306 || tcp.srcport == 3306)".
[8 Jul 2013 15:09] Michiel Hazelhof
When low values are supplied (e.g. > 200), the connector will fail when the network can't handle it, even breaking other programs that rely on the network connection!)
[4 Mar 2014 18:08] Daniel So
Added the following entry in the Connector/Net 6.6.7 and 6.7.5 changelogs:

"The value for the Keepalive option in the connection string was interpreted by Connector/Net to be in milliseconds. This fix makes it to be interpreted as number of seconds, as specified in the documentation."
[5 Mar 2014 8:36] Michiel Hazelhof
This bug also applies to the 6.8.x branche, will it be fixed there to?
[6 Mar 2014 16:23] Francisco Alberto Tirado Zavala
Hello Michiel.

Yes the fix was also applied to 6.8.x version.
[13 Mar 2014 11:11] Michiel Hazelhof
Could you tell me what 6.8.x release this will be applied to? The current 6.8.3 still has this bug.
[1 May 2014 20:31] Philip Olson
This fix also applies to the upcoming Connector/Net 6.8.4 release, and the pending documentation update was also updated to reflect this change.

Thank you for the bug report.