Increased connection timeouts.
This commit is contained in:
parent
a5286899b7
commit
4bd77515d8
|
@ -534,7 +534,7 @@ open class Client<CONNECTION : Connection>(config: ClientConfiguration = ClientC
|
||||||
(config.enableIpc && (remoteAddress == null || isSelfMachine)) || (!config.enableIpc && remoteAddress == null)
|
(config.enableIpc && (remoteAddress == null || isSelfMachine)) || (!config.enableIpc && remoteAddress == null)
|
||||||
|
|
||||||
// how long does the initial handshake take to connect
|
// 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.
|
// how long before we COMPLETELY give up retrying. A '0' means try forever.
|
||||||
var connectionTimoutInNs = TimeUnit.SECONDS.toNanos(connectionTimeoutSec.toLong())
|
var connectionTimoutInNs = TimeUnit.SECONDS.toNanos(connectionTimeoutSec.toLong())
|
||||||
|
|
||||||
|
|
|
@ -455,7 +455,7 @@ abstract class Configuration protected constructor() {
|
||||||
/**
|
/**
|
||||||
* How long a connection must be disconnected before we cleanup the memory associated with it
|
* 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) {
|
set(value) {
|
||||||
require(!contextDefined) { errorMessage }
|
require(!contextDefined) { errorMessage }
|
||||||
field = value
|
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.
|
* 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) {
|
set(value) {
|
||||||
require(!contextDefined) { errorMessage }
|
require(!contextDefined) { errorMessage }
|
||||||
field = value
|
field = value
|
||||||
|
|
|
@ -74,7 +74,7 @@ internal class ServerHandshake<CONNECTION : Connection>(
|
||||||
|
|
||||||
init {
|
init {
|
||||||
// we MUST include the publication linger timeout, otherwise we might encounter problems that are NOT REALLY problems
|
// 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) {
|
if (EndPoint.DEBUG_CONNECTIONS) {
|
||||||
// connections are extremely difficult to diagnose when the connection timeout is short
|
// connections are extremely difficult to diagnose when the connection timeout is short
|
||||||
|
|
Loading…
Reference in New Issue