Skip to content

Add warning when mysql-use_tcp_keepalive or pgsql-use_tcp_keepalive are set to false #5212

@renecannao

Description

@renecannao

Problem

When ProxySQL is deployed behind a network load balancer, setting mysql-use_tcp_keepalive or pgsql-use_tcp_keepalive to false can cause connection issues. Load balancers may drop idle connections.

Proposed Solution

Add a warning in the error log when ProxySQL detects that either:

  • mysql-use_tcp_keepalive=false
  • pgsql-use_tcp_keepalive=false

Warning Message

WARNING: mysql-use_tcp_keepalive is set to false. This may cause connection drops when ProxySQL is behind a network load balancer. Consider setting this to true.

Implementation Considerations

  • The warning should be logged during startup/configuration reload
  • Only warn when the setting is explicitly set to false
  • This is a warning, not an error - the configuration should still be allowed

Risk Level

Medium - Connection drops can cause service interruptions, but this is configuration-dependent rather than a bug.

Use Case

Helps users avoid hard-to-diagnose connectivity issues when ProxySQL is deployed in common load-balanced architectures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions