public inbox for [email protected]  
help / color / mirror / Atom feed
PG-15.6: timeout parameters erroring out
4+ messages / 4 participants
[nested] [flat]

* PG-15.6: timeout parameters erroring out
@ 2025-02-10 04:34 Mukesh Tanuku <[email protected]>
  2025-02-10 04:54 ` Re: PG-15.6: timeout parameters erroring out David Rowley <[email protected]>
  2025-02-10 05:02 ` Re: PG-15.6: timeout parameters erroring out Tom Lane <[email protected]>
  0 siblings, 2 replies; 4+ messages in thread

From: Mukesh Tanuku @ 2025-02-10 04:34 UTC (permalink / raw)
  To: [email protected]

Hello team,

We unabled the postgres timeout parameters in the postgresql.conf file


*idle_in_transaction_session_timeout = '1min'idle_session_timeout = '5min'*

other way also, like below

*idle_in_transaction_session_timeout = 60000idle_session_timeout = 300000*

we see these errors reporting in the logs after we enabled those parameters
*log:*
2025-02-10 04:17:19.156 GMT [2467573] ERROR:  trailing junk after numeric
literal at or near "1m" at character 43
2025-02-10 04:17:19.156 GMT [2467573] STATEMENT:  SET
idle_in_transaction_session_timeout = 1min
2025-02-10 04:17:19.845 GMT [2467575] ERROR:  trailing junk after numeric
literal at or near "1m" at character 43
2025-02-10 04:17:19.845 GMT [2467575] STATEMENT:  SET
idle_in_transaction_session_timeout = 1min
...
...
...

2025-02-10 04:22:00.823 GMT [2468337] ERROR:  trailing junk after numeric
literal at or near "5m" at character 28
2025-02-10 04:22:00.823 GMT [2468337] STATEMENT:  SET idle_session_timeout
= 5min
2025-02-10 04:22:03.487 GMT [2468342] ERROR:  trailing junk after numeric
literal at or near "5m" at character 28
2025-02-10 04:22:03.487 GMT [2468342] STATEMENT:  SET idle_session_timeout
= 5min
2025-02-10 04:22:04.470 GMT [2468345] ERROR:  trailing junk after numeric
literal at or near "5m" at character 28

Is there any know issue/bug with these paramters, can someone help me to
get this worked since our app idle connections are getting pilled up and
reaching max connections.

I really appreciate your help. Thank you.

Regards
Mukesh Tanuku


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: PG-15.6: timeout parameters erroring out
  2025-02-10 04:34 PG-15.6: timeout parameters erroring out Mukesh Tanuku <[email protected]>
@ 2025-02-10 04:54 ` David Rowley <[email protected]>
  1 sibling, 0 replies; 4+ messages in thread

From: David Rowley @ 2025-02-10 04:54 UTC (permalink / raw)
  To: Mukesh Tanuku <[email protected]>; +Cc: [email protected]

On Mon, 10 Feb 2025 at 17:34, Mukesh Tanuku <[email protected]> wrote:
> 2025-02-10 04:22:00.823 GMT [2468337] ERROR:  trailing junk after numeric literal at or near "5m" at character 28
> 2025-02-10 04:22:00.823 GMT [2468337] STATEMENT:  SET idle_session_timeout = 5min
> 2025-02-10 04:22:03.487 GMT [2468342] ERROR:  trailing junk after numeric literal at or near "5m" at character 28
> 2025-02-10 04:22:03.487 GMT [2468342] STATEMENT:  SET idle_session_timeout = 5min
> 2025-02-10 04:22:04.470 GMT [2468345] ERROR:  trailing junk after numeric literal at or near "5m" at character 28
>
> Is there any know issue/bug with these paramters, can someone help me to get this worked since our app idle connections are getting pilled up and reaching max connections.

I don't see any issues with the postgresql.conf, but it looks like
you're just missing single quotes in your SET statements. See [1],
where it says:

"New value of parameter. Values can be specified as string constants,
identifiers, numbers, or comma-separated lists of these, as
appropriate for the particular parameter."

String constants [2] require single quotes or the dollar quoting
format and 5min isn't a valid number.

David

[1] https://www.postgresql.org/docs/17/sql-set.html
[2] https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: PG-15.6: timeout parameters erroring out
  2025-02-10 04:34 PG-15.6: timeout parameters erroring out Mukesh Tanuku <[email protected]>
@ 2025-02-10 05:02 ` Tom Lane <[email protected]>
  2025-02-10 05:08   ` Re: PG-15.6: timeout parameters erroring out David G. Johnston <[email protected]>
  1 sibling, 1 reply; 4+ messages in thread

From: Tom Lane @ 2025-02-10 05:02 UTC (permalink / raw)
  To: Mukesh Tanuku <[email protected]>; +Cc: [email protected]

Mukesh Tanuku <[email protected]> writes:
> We unabled the postgres timeout parameters in the postgresql.conf file

> *idle_in_transaction_session_timeout = '1min'idle_session_timeout = '5min'*

Did you actually run them together on one line like that?  The normal
thing is one setting per line.  It might be that the config file
parser will let you get away with just spaces rather than a newline
between settings, but I'm not terribly surprised if it fails without
any whitespace at all.  However, since you showed us neither the exact
config file contents nor the error message you got, this is all just
speculation.

> 2025-02-10 04:17:19.156 GMT [2467573] ERROR:  trailing junk after numeric
> literal at or near "1m" at character 43
> 2025-02-10 04:17:19.156 GMT [2467573] STATEMENT:  SET
> idle_in_transaction_session_timeout = 1min

This case however is pretty clear: you need single quotes around the
value '1min', and you didn't provide them.

			regards, tom lane






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: PG-15.6: timeout parameters erroring out
  2025-02-10 04:34 PG-15.6: timeout parameters erroring out Mukesh Tanuku <[email protected]>
  2025-02-10 05:02 ` Re: PG-15.6: timeout parameters erroring out Tom Lane <[email protected]>
@ 2025-02-10 05:08   ` David G. Johnston <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: David G. Johnston @ 2025-02-10 05:08 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: Mukesh Tanuku <[email protected]>; [email protected] <[email protected]>

On Sunday, February 9, 2025, Tom Lane <[email protected]> wrote:

> Mukesh Tanuku <[email protected]> writes:
> > We unabled the postgres timeout parameters in the postgresql.conf file
>
> > *idle_in_transaction_session_timeout = '1min'idle_session_timeout =
> '5min'*
>
Did you actually run them together on one line like that?


>
I think that is an email client artifact, dealing with RTF or something.

I do agree too much is missing here.  The only known errors involve SET
which configuration file settings don’t use.  And those errors are indeed
the lack of quoting.

The lack of space I mentioned earlier, in the config text literal, is fine.

David J.


^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2025-02-10 05:08 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-02-10 04:34 PG-15.6: timeout parameters erroring out Mukesh Tanuku <[email protected]>
2025-02-10 04:54 ` David Rowley <[email protected]>
2025-02-10 05:02 ` Tom Lane <[email protected]>
2025-02-10 05:08   ` David G. Johnston <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox