[pgpool-general: 7497] Re: pgpool2 in kubernetes dies

Nathan Ward lists+pgpool at daork.net
Mon Apr 12 17:05:03 JST 2021

> On 8/04/2021, at 5:13 PM, Nikolay Mastilo (HM) <nikm71 at hotmail.com> wrote:
> Hi all! Does anyone have experience in launching pgpool2 in kubernetes? Our pgpool2 image running in k8s freezes after 90min and does not answer on requests.
> It answers after restart only. Database was neither stopped nor restarted. Please help!


This sounds to me a lot like your kernel is configured with a conntrack timeout of 90m somewhere. By default the linux tcp keepalive doesn’t kick in until 7200s (120m). This is very common when using hardware stateful firewalls with low tcp timeouts.

Check the sysctl net.netfilter.nf_conntrack_tcp_timeout_established in your host, and/or adjust the kernel tcp keepalive start timer (net.ipv4.tcp_keepalive_time).

Also check other similar keepalive / timeout things which apply. iptables can set the timeout per flow, as well.

Your environment might also have some proxy stuff going on with different timeouts and/or keepalive timers, so you’ll need to look in to that.

Almost certainly though, this is a tcp timeout in a firewall (probably iptables).

Nathan Ward

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20210412/3ca1eb1f/attachment.htm>

More information about the pgpool-general mailing list