Skip to content

Weird configuration of iddle connection #4362

@pavel-jares-bcm

Description

@pavel-jares-bcm

Describe the bug
This issue is acout time configuration to control connection by iddle time. The point is that the task to clean old idle connections is much bigger that the idle time itself. It should be in oposite.

@Value("${apiml.connection.idleConnectionTimeoutSeconds:#{5}}")
private int idleConnTimeoutSeconds;

this.connectionManagerTimer.schedule(new TimerTask() {
@Override
public void run() {
connectionManager.closeExpired();
connectionManager.closeIdle(Timeout.ofSeconds(idleConnTimeoutSeconds));
}
}, 30000, 30000);

It means that connection that should be waiting for 5 second is closed in 30 seconds. That basically means that real idle time is between 5 and 30 seconds (in theory up to 35secs)

Expected behavior
I would suggest to set idle time to 30 seconds and run the schedulled task every 10 seconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: LowbugVerified defect in functionalityclarificationIssue is being clarified in the discussion with the creator of the issuesize/M

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions