Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

FATAL: terminating connection due to idle-in-transaction timeout #222

Closed
nagaraju11 opened this issue Jan 6, 2020 · 7 comments
Closed

Comments

@nagaraju11
Copy link

When I tried to repack my bloated table an error occurred:

FATAL: terminating connection due to idle-in-transaction timeout
ERROR: query failed: SSL connection has been closed unexpectedly
DETAIL: query was: SAVEPOINT repack_sp1

and this error is occurring in large tables only, and current table size which is running about 700GB

/pg_repack --version
pg_repack 1.4.3

DB version: PostgreSQL 9.6.11 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.9.3, 64-bit

@Melkij
Copy link
Collaborator

Melkij commented Jan 7, 2020

Hello
You need disable idle_in_transaction_session_timeout. This is postgresql setting and it is disabled by default. pg_repack does not handle this case.

@nagaraju11
Copy link
Author

nagaraju11 commented Jan 7, 2020 via email

@Melkij
Copy link
Collaborator

Melkij commented Jan 7, 2020

Is it on the same user and database? I means such timeout may be per-user or per-database setting (\drds in psql)
terminating connection due to idle-in-transaction timeout is clearly related only to idle_in_transaction_session_timeout https://github.com/postgres/postgres/blob/REL9_6_11/src/backend/tcop/postgres.c#L3019

@nagaraju11
Copy link
Author

nagaraju11 commented Jan 7, 2020 via email

@nagaraju11
Copy link
Author

yeah its working now.

I have disabled idle_in_transaction_session_timeout but did not reload the config file. its working fine after reloaded the server.

Thank you

@davidklika
Copy link

Hello. It is not very nice to reconfigure (especially production) database server before and after every db maintenance task. Would it be possible to set idle_in_transaction_session_timeout to zero locally in pg_repack sessions? (for version 9.6 and newer). Any comments? Thank you

@bukem
Copy link

bukem commented Jan 25, 2022

Agree with @davidklika and I also have another question - why does pg_repack has transaction that fails with idle_in_transaction timeout?
Thanks

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants