Maxlength of a line in a statefile

We’re using service discovery with haproxy, and use statefile to revive states during reloads. Sometimes loading from the statefile is failing with error corrupted global server state file 'path/to/statefile' at line somenumber

Upon debugging, we learnt that maximum allowed characters in a state_line is 512

the fqdn of the real server and srv records are very big in size in our environment which easily exceeds defined 512 length.

Is there any reason it is contained within 512 chars? can we change it? Any recommendations to work this around will be very helpful.

1 Like

I don’t know either, I suggest you file a feature request directly with your findings:

@lukastribus done Maxlength of a line in a statefile · Issue #1530 · haproxy/haproxy · GitHub

1 Like