Type: | integer |
Default: | 0 (0ms) |
Min: | 0 (0ms) |
Max: | 2147483647 (2147483647ms) |
Unit: | milliseconds (ms) |
Context: | user |
Restart: | false |
Since: | 9.6 |
Terminate any session with an open transaction that has been idle for longer than the specified amount of time. This allows any locks held by that session to be released and the connection slot to be reused; it also allows tuples visible only to this transaction to be vacuumed. See routine-vacuuming for more details about this.
If this value is specified without units, it is taken as milliseconds. A value of zero (the default) disables the timeout.
Recommendations
Set to 1 hour maximum, or as low as 1 minute if you know your query load well. Idle transactions are bad news.
On StackOverflow
- idle_in_transaction_session_timeout fall down my application
- Stymied by idle_in_transaction_session_timeout
- How to pass idle_in_transaction_session_timeout parameter in db url?
- What is the default value for "idle_in_transaction_session_timeout" of PostgreSQL in CloudSQL?
- Scala Playframework Slick: how to pass PostgreSQL params?