RE: Connection remains idle for more than 15 minutes, then the connection drops by IPVS setting in k8s kube-proxy

From: M Tarkeshwar Rao <m(dot)tarkeshwar(dot)rao(at)ericsson(dot)com>
To: Matthias Apitz <guru(at)unixarea(dot)de>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, Piyush Anand <piyush(dot)anand(at)ericsson(dot)com>, Neeraj Gupta G <neeraj(dot)g(dot)gupta(at)ericsson(dot)com>
Subject: RE: Connection remains idle for more than 15 minutes, then the connection drops by IPVS setting in k8s kube-proxy
Date: 2024-03-05 11:37:25
Message-ID: PAWPR07MB1009513749E6F6EE032261A83AE222@PAWPR07MB10095.eurprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Matthias,

Currently many customers are using this.
We want to use libpq library APIs only. Is there any support of keepalive at client side?

Regards
Tarkeshwar

-----Original Message-----
From: Matthias Apitz <guru(at)unixarea(dot)de>
Sent: Tuesday, March 5, 2024 4:59 PM
To: M Tarkeshwar Rao <m(dot)tarkeshwar(dot)rao(at)ericsson(dot)com>
Cc: pgsql-general(at)postgresql(dot)org; Piyush Anand <piyush(dot)anand(at)ericsson(dot)com>; Neeraj Gupta G <neeraj(dot)g(dot)gupta(at)ericsson(dot)com>
Subject: Re: Connection remains idle for more than 15 minutes, then the connection drops by IPVS setting in k8s kube-proxy

El día martes, marzo 05, 2024 a las 11:08:27 +0000, M Tarkeshwar Rao escribió:

> Hi all,
>
> "
> We are using libpq c client (Version : 14.10) of postgresql in our application to connect with postgresql database server (Version 14.10).
> For making connection we are using libpq's API "PQsetdbLogin()".
>
> Problem Statement : If our connection remains idle for more than 15 minutes, then the connection drops by IPVS setting in k8s kube-proxy.
>
> Query : Is there any way we can provide values of "keepalives_idle, keepalives_interval, keepalives_count" client parameters in the API "PQsetdbLogin()" while creating the connection.
> If yes, then can someone please provide the sample code for the same.
> We need these parameters support at client side only.
> "
>
> Is there any other alternative approach using some configuration files from client side?

An option could be to run the connection through an SSH tunnel and use there the sshd(8) config parameter ClientAliveInterval.

HIH

matthias

--
Matthias Apitz, ✉ guru(at)unixarea(dot)de, https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-8bc62051d01460c7&q=1&e=8f12e60a-aafb-44bb-8a35-b4781b90d8c1&u=http%3A%2F%2Fwww.unixarea.de%2F +49-176-38902045 Public GnuPG key: https://protect2.fireeye.com/v1/url?k=31323334-501d5122-313273af-454445555731-a831eed841ce4cbb&q=1&e=8f12e60a-aafb-44bb-8a35-b4781b90d8c1&u=http%3A%2F%2Fwww.unixarea.de%2Fkey.pub

I am not at war with Russia. Я не воюю с Россией.
Ich bin nicht im Krieg mit Russland.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2024-03-05 11:54:59 Re: Connection remains idle for more than 15 minutes, then the connection drops by IPVS setting in k8s kube-proxy
Previous Message Matthias Apitz 2024-03-05 11:29:04 Re: Connection remains idle for more than 15 minutes, then the connection drops by IPVS setting in k8s kube-proxy