diff --git a/pkg/haproxy/api/runtime.go b/pkg/haproxy/api/runtime.go index 1dffff2a..0dca51ce 100644 --- a/pkg/haproxy/api/runtime.go +++ b/pkg/haproxy/api/runtime.go @@ -42,7 +42,7 @@ func (c *clientNative) SetServerAddrAndState(servers []RuntimeServerData) error return nil } backendNameSize := len(servers[0].BackendName) - oneServerCommandSize := 65 + 2*backendNameSize + oneServerCommandSize := 75 + 2*backendNameSize size := oneServerCommandSize * len(servers) if size > BufferSize { size = BufferSize @@ -73,7 +73,7 @@ func (c *clientNative) SetServerAddrAndState(servers []RuntimeServerData) error cmdBuilder.WriteString(";") // if new commands are added recalculate oneServerCommandSize - if sb.Len()+cmdBuilder.Len() >= size { + if sb.Len()+cmdBuilder.Len() >= BufferSize { err = c.runRaw(runtime, sb, server.BackendName) if err != nil { return err