New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[YSQL] PgClient session has a default timeout of 120 secs #16157
Comments
@Huqicheng can you confirm if this is basically the same packed full row update issue? |
@basavaraj29 / @robertsami , Can we check if this fails in master too? The full row update optimization in PackedRow has been disabled for now. So would be good to understand if this is still an issue and a blocker for 2.18.0 timeframe. |
yes, the statements timeout on current
|
Summary: PgClient session times out after a default value of 120 secs as the timeout value is not being set. Setting the timeout value explicitly after initializing a Pg session. Note: We still don't fully support the feature of a pg statement not timing out when `statement_timeout=0` is set. Instead, the rpc times out after the 600 secs. If required, we can set the timeout to `MonoDelta::kMax` which will give us a greater timeout for the rpc. Test Plan: ./yb_build.sh --gtest_filter PgBackendsTest.TestStatementTimeout Reviewers: zyu, pjain, myang, dmitry Reviewed By: myang, dmitry Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D25195
Summary: Commit 0c45e0c, titled [#16157] YSQL: Set PgClient session timeout value adds test TestStatementTimeout in pg_backends-test.cc. It does not belong there. PgBackendsTest is for tests related to wait on backends catalog version. The class itself sets flags related to that. It does not make sense for the newly added test to subclass that test since it doesn't make use of anything there. Move the test to PgLibPqTest, which is where general YSQL C++ external mini cluster tests go. Close: #17433 Test Plan: ./yb_build.sh fastdebug --gcc11 \ --cxx-test pgwrapper_pg_libpq-test \ --gtest_filter PgLibPqTest.TestStatementTimeout Reviewers: bkolagani, dmitry, myang Reviewed By: bkolagani, myang Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D25480
@m-iancu , Do you think this needs to be backported all the way to 2.14? Currently we are tracking the backports. But wanted to check if you think it is not needed etc. |
@basavaraj29 , to add the link to Fiza's fix for honoring client side timeout issue. As such, we may not need to backport this all the way back to 2.14. |
Summary: PgClient session times out after a default value of 120 secs as the timeout value is not being set. Setting the timeout value explicitly after initializing a Pg session. Note: We still don't fully support the feature of a pg statement not timing out when `statement_timeout=0` is set. Instead, the rpc times out after the 600 secs. If required, we can set the timeout to `MonoDelta::kMax` which will give us a greater timeout for the rpc. Original commit: 0c45e0c/D25195 Jira: DB-5591 Test Plan: Skipping the unit test as it has a few more dependencies which aren't present in 2.16 Reviewers: rthallam, pjain, myang, dmitry Reviewed By: myang Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D26025
Summary: PgClient session times out after a default value of 120 secs as the timeout value is not being set. Setting the timeout value explicitly after initializing a Pg session. Note: We still don't fully support the feature of a pg statement not timing out when `statement_timeout=0` is set. Instead, the rpc times out after the 600 secs. If required, we can set the timeout to `MonoDelta::kMax` which will give us a greater timeout for the rpc. Original commit: 0c45e0c/D25195 Jira: DB-5591 Test Plan: Skipping the unit test as it has a few more dependencies which aren't present in 2.16 Reviewers: rthallam, pjain, myang, dmitry Reviewed By: myang Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D26040
Summary: PgClient session times out after a default value of 120 secs as the timeout value is not being set. Setting the timeout value explicitly after initializing a Pg session. Note: We still don't fully support the feature of a pg statement not timing out when `statement_timeout=0` is set. Instead, the rpc times out after the 600 secs. If required, we can set the timeout to `MonoDelta::kMax` which will give us a greater timeout for the rpc. Original commits: 0c45e0c/D25195 and 7968bd5/D25480 Jira: DB-5591 Test Plan: ./yb_build.sh --gtest_filter PgLibPqTest.TestStatementTimeout Reviewers: rthallam, pjain, myang, dmitry Reviewed By: myang Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D26022
Jira Link: DB-5591
Description
The timeout value for
PgClient
is not being set and a default of 120 secs is being set always.So the value passed when the cluster is being created is ignored. The below will still result in the client timing out only after 120 secs.
e7cc94a modified the way we handle session timeout and fbcb98e removed the introduced logic.
Previous Description
A session blocked by another session times out with the message below after waiting for 120s. This is not in line with the expected behavior of waiting until the lock is resolved (by either commit or rollback by the blocking session. This is inspite of setting statement_timeout to 0 which mean there is no defined timeout.
ERROR: Timed out: Perform RPC (request call id 71) to 172.151.28.116:9100 timed out after 120.000s
This behavior is only observed when read committed isolation is used with "wait queues" implemented pessimistic locking. When read committed isolation is used with pessimistic locking without wait queues, the blocked session does not time out which is the desired behaviour.
Steps to reproduce:
YB Build & G-flags used:
a) create table
b) In session 1,
c) In session 2,
The text was updated successfully, but these errors were encountered: