Repository navigation
Set PostgreSQL idle in transaction session timeout in deploy profile - #3600
Open
richturner wants to merge 1 commit into
Open
richturner wants to merge 1 commit into
richturner wants to merge 1 commit into
Conversation
Pass POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT (default 10min) to the postgresql service so sessions left idle in a transaction are terminated before they can prevent autovacuum removing dead rows. Requires an openremote/postgresql image that supports the variable; older images ignore it.
This was referenced Nov 20, 2026
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Passes
POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUT(default10min,0disables) to thepostgresqlservice inprofile/deploy.yml, next toPOSTGRES_MAX_CONNECTIONS.Sessions left idle in a transaction prevent autovacuum removing dead rows. On a production instance this bloated the
openremote.assetheap to 177 MB for about 2,900 rows (3.7 MB afterVACUUM FULL). The timeout terminates such sessions before they cause bloat.Depends on
Related
pg_connections_stuck) and the asset table heap size (pg_asset_raw_data_size)Checklist