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

Connection worker delay is not being respected #1932

Open
steve-chavez opened this issue Sep 2, 2021 · 2 comments
Open

Connection worker delay is not being respected #1932

steve-chavez opened this issue Sep 2, 2021 · 2 comments

Comments

@steve-chavez
Copy link
Member

On v7, it used to be that all requests would get rejected with 503 while the connection worker is running. But on v8.0, the connection recovery is done whenever a new request comes in:

curl -I localhost:3000/projects
HTTP/1.1 503 Service Unavailable
Date: Tue, 17 Aug 2021 17:15:12 GMT
Server: postgrest/8.0.0 (b3899e7)
Retry-After: 32
Content-Type: application/json; charset=utf-8

sudo systemctl start postgresql

## just a second after

curl -I localhost:3000/projects
HTTP/1.1 200 OK
Date: Tue, 17 Aug 2021 17:15:46 GMT
Server: postgrest/8.0.0 (b3899e7)
Content-Range: 0-58/*
Content-Location: /projects
Content-Type: application/json; charset=utf-8

## postgrest is already recovered

## The connection worker will report the reconnection later(after 32 sec):
## 17/Aug/2021:12:16:05 -0500: Connection successful
## 17/Aug/2021:12:16:05 -0500: Config re-loaded
## 17/Aug/2021:12:16:06 -0500: Schema cache loade

This is probably a side effect of doing #1559.

@wolfgangwalther
Copy link
Member

Not sure what the dev label is supposed to mean here. I might not fully understand the issue, but this looks like a regression from v7 to me - so a bug?

@steve-chavez
Copy link
Member Author

steve-chavez commented Jun 5, 2023

Edit: Left for later

Will work this on #2813. But even with no change I believe it's not a bug(it's actually a feature) since the Retry header is just a hint - we can recover earlier and this is better for all clients.


Not sure what the dev label is supposed to mean here.

Sidenote: I also don't get that label(I don't recall adding it). Will delete it and move the usages to "hygiene".

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

No branches or pull requests

2 participants