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

fix: query timeout #768

Merged
merged 1 commit into from
May 2, 2024
Merged

fix: query timeout #768

merged 1 commit into from
May 2, 2024

Conversation

soedirgo
Copy link
Member

@soedirgo soedirgo commented May 2, 2024

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Testing locally, select pg_sleep(<forever>) just hangs even past the connectionTimeoutMillis

What is the new behavior?

Use query_timeout instead which returns Query read timeout with a 400

@soedirgo soedirgo requested review from a team as code owners May 2, 2024 03:28
@soedirgo soedirgo merged commit e49ebcd into master May 2, 2024
4 checks passed
@soedirgo soedirgo deleted the fix/query-tiemout branch May 2, 2024 03:32
@@ -43,7 +43,7 @@ export const GENERATE_TYPES_DETECT_ONE_TO_ONE_RELATIONSHIPS =

export const DEFAULT_POOL_CONFIG: PoolConfig = {
max: 1,
connectionTimeoutMillis: PG_CONN_TIMEOUT_SECS * 1000,
query_timeout: PG_CONN_TIMEOUT_SECS * 1000,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A connection timeout is not a query timeout. imo it's very misleading to feed in a "CONN_TIMEOUT" here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, made a PR to revert it: #777

@@ -43,7 +43,7 @@ export const GENERATE_TYPES_DETECT_ONE_TO_ONE_RELATIONSHIPS =

export const DEFAULT_POOL_CONFIG: PoolConfig = {
max: 1,
connectionTimeoutMillis: PG_CONN_TIMEOUT_SECS * 1000,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this results in the default of 0 taking over - which is not what we want.

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

Successfully merging this pull request may close these issues.

3 participants