Skip to content
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

statement_timeout not working for new Pool in dbs mod #868

Closed
dbauszus-glx opened this issue Aug 9, 2023 · 1 comment · Fixed by #1017
Closed

statement_timeout not working for new Pool in dbs mod #868

dbauszus-glx opened this issue Aug 9, 2023 · 1 comment · Fixed by #1017
Assignees
Labels
Bug A genuine bug. There must be some form of error exception to work with.

Comments

@dbauszus-glx
Copy link
Member

A pg_sleep query template should timeout when the seconds exceed the default 10000 milliseconds set on the Pool used for client connections in the dbs mod.

"template": "select pg_sleep(%{seconds});"

This doesn't work.

/api/query?template=sleep&seconds=20

Setting an implicit statement_timeout as param does work.

/api/query?template=sleep&seconds=20&statement_timeout=1000
@dbauszus-glx dbauszus-glx added the Bug A genuine bug. There must be some form of error exception to work with. label Aug 9, 2023
@dbauszus-glx dbauszus-glx self-assigned this Aug 9, 2023
@dbauszus-glx
Copy link
Member Author

Resetting the statement_timeout prior to releasing the client doesn't seem to do anything. The client returned from the pool connect will not have the previously set statement_timeout.

The query_timeout option for the pool does kill the client request.

@dbauszus-glx dbauszus-glx linked a pull request Nov 23, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A genuine bug. There must be some form of error exception to work with.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant