Increased connection timeouts.

master
Robinson 2023-11-03 18:21:35 +01:00
parent a5286899b7
commit 4bd77515d8
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
3 changed files with 4 additions and 4 deletions

View File

@ -534,7 +534,7 @@ open class Client<CONNECTION : Connection>(config: ClientConfiguration = ClientC
(config.enableIpc && (remoteAddress == null || isSelfMachine)) || (!config.enableIpc && remoteAddress == null)
// how long does the initial handshake take to connect
var handshakeTimeoutNs = aeronDriver.publicationConnectionTimeoutNs() + aeronDriver.lingerNs()
var handshakeTimeoutNs = TimeUnit.SECONDS.toNanos(config.connectionCloseTimeoutInSeconds.toLong()) + aeronDriver.publicationConnectionTimeoutNs() + aeronDriver.lingerNs()
// how long before we COMPLETELY give up retrying. A '0' means try forever.
var connectionTimoutInNs = TimeUnit.SECONDS.toNanos(connectionTimeoutSec.toLong())

View File

@ -455,7 +455,7 @@ abstract class Configuration protected constructor() {
/**
* How long a connection must be disconnected before we cleanup the memory associated with it
*/
var connectionCloseTimeoutInSeconds: Int = 10
var connectionCloseTimeoutInSeconds: Int = 60
set(value) {
require(!contextDefined) { errorMessage }
field = value
@ -469,7 +469,7 @@ abstract class Configuration protected constructor() {
*
* Too low and it's likely to get false-positives, too high and there will be some lag when detecting if a connection has been disconnected.
*/
var connectionExpirationTimoutNanos = TimeUnit.SECONDS.toNanos(2)
var connectionExpirationTimoutNanos = TimeUnit.SECONDS.toNanos(4)
set(value) {
require(!contextDefined) { errorMessage }
field = value

View File

@ -74,7 +74,7 @@ internal class ServerHandshake<CONNECTION : Connection>(
init {
// we MUST include the publication linger timeout, otherwise we might encounter problems that are NOT REALLY problems
var handshakeTimeoutNs = aeronDriver.publicationConnectionTimeoutNs() + aeronDriver.lingerNs()
var handshakeTimeoutNs = TimeUnit.SECONDS.toNanos(config.connectionCloseTimeoutInSeconds.toLong()) + aeronDriver.publicationConnectionTimeoutNs() + aeronDriver.lingerNs()
if (EndPoint.DEBUG_CONNECTIONS) {
// connections are extremely difficult to diagnose when the connection timeout is short