-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
The HAProxy configuration has a very aggressive client and server timeout setting of 50s. This is likely ok for load balancing web requests, but a lot of applications that connect to things like databases may not be designed to handle such a short timeout.
We experienced this issue when deploying cloudnative pg (postgresql) within k8s with applications that connect outside of k8s to the database. As a workaround I manually ssh'd into the VR and modified the HAProxy configuration to confirm it was the cause.
It appears the configuration is here:
| "\toption forwardfor", "\toption httpclose", "\ttimeout connect 5000", "\ttimeout client 50000", "\ttimeout server 50000"}; |
and gets written here:
| final List<String> dSection = Arrays.asList(defaultsSection); |
with no overrides available. The only real override i see is maxconn a few lines above.
I can create a PR to address this as a global config override kind of like maxconn, but I'm not sure if it is the right solution. This setting can also be applied via haproxy configuration at the pool level, but of course cloudstack doesn't support that either.