Hi > Hi,
> On Wed, Jan 16, 2019 at 11:24:58AM +0300, Wert wrote: >> Problem: >> Sometimes in multi-process configuration might appear error "Failed to get >> the number of sockets to be transferred !" during reload. >> Than new instance would silently fail like 50-80% of new connections. >> >> >> Reason: >> There is hard-coded timeout in get_old_sockets() - 1 second. >> It is used for sockets receiving from old master to new master during reload >> (https://github.com/haproxy/haproxy/blob/v1.8.0/src/haproxy.c#L977) >> >> In case of "very low CPU-power + a lot of FDs" (or just temporary latency >> problems that possible on VPS, during overload and in many other rare but >> easy imaginable cases) >> - 1 second exceeded and there is no workaround for this case >> >> >> Fix: >> Some smart processing for error should be the right way. >> But I don't see problems that might be related to bigger timeout. >> So, I just clumsy change this timeout to 9sec and it works 100% OK on dozens >> heavy-loaded production servers. > Actually I'm quite shocked to see that there is no response for one full > second. It's unrelated to the number of FDs, it means the socket remained > silent for one second, since it's a socket timeout! This means it could > happen with any other socket, and one second is an eternity in the network > world. I see how increasing the value may hide deeper problems, but frankly > I'd also try to figure how it is possible that the socket remains > unresponsive for this long. > I think that's something we should probably make configurable in the > global section anyway, since there's no good value. The larger the value, > the higher the risk of trouble upon startup when trying to communicate > with a sick or dead process. > Thanks, > Willy Thank you. I thought about FDs because it was new problem at the time I had increase in infinitely growing amount of FDs (https://www.mail-archive.com/[email protected]/msg30661.html) + the problem mostly happened after some days\weeks uptime. Across many servers only few were affected and it was related to low CPU power or high soft-IRQ (due to another tasks). So, it should be possible to get during any overload, especially DDOS. By the way, my conditions are not too common: often reloads, 0.5mb cfg + 10mb lua, increased CPU-priority for haproxy. --- Wert

