-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Bug] Weirdness with Postgres 14 #2938
Comments
Please see #2933 |
I agree with you. I had the same issue last night using the new docker-compose and after clearing the postgres volume when I was working on some PR [But with same compose structuration and postgres 10 (and clear volumes ofc) instead 14, it works]) |
@MathiusD @JackHewson could you try with postgres 13 instead? |
I'm testing this as soon as possible (My laptop is out of battery and charging it on the bus is not the easiest thing ^^') |
Test from clean out of curiousity, it works. it throws error first because DB not exist/created yet, then it created. Invidious connect after that Docker Logs (click to expand)
|
@JackHewson |
@unixfox Yes, the production docker-compose works fine. |
Oh right sorry I didn't know that. If you have nothing on docker you should stop everything in docker (you can use Then try |
Found the issue (I think) I forgot to edit the dockerfile, that has a sed to replace the hostname of the DB: https://github.com/iv-org/invidious/blob/master/docker/Dockerfile#L45 |
Sorry for the delay. Here are the results of the tests with the docker-compose of master where I alter only the version of postgres : 10, 11, 12 and 13 : no issues encoutered And for the 14, postgres does not encounter any problem, however the invidious container never manages to finalize its startup (I'm currently looking at what stage it remains blocked to eat 100% of my processor) (Note: during each tests I have no pre-existing volume or any other container running) Edited : After having debugged to see what was the blocking step it is well the connection to the DB (And followings logs in postgres confirms : |
Okay, something is really wrong: there's 0 problem with Postgres 13 but Invidious doesn't try to reconnect with Postgres 14. Exact same setup (both running #2938 ) It should work, but it doesn't. Even though Postgres 14 works in production... This is Postgres 13: Docker Logs (click to expand)
|
This black magic, dunno what happen |
Re-opening since there's definitely a problem with Postgres 14 I suspect adding a wait time before initialization might fix it. |
@TheFrenchGhosty or we could simply go back to Postgres 13 while we figure it out. |
@SamantazFox Postgres 14 works in production the problem is only when running the development compose |
I've been trying stuff for the last hour or so... I just don't get what's the issue. For whatever reason Invidious can't connect to Postgres 14 (or doesn't retry after it fails), but has no problem with Postgres 13. It doesn't make ANY sense. Here some logs, where the only difference is the Postgres version (I renamed the DB so the name is normal). Postgres 14: Docker Logs (click to expand)Creating invidiousdb ... done Postgres 13: Docker Logs (click to expand)Creating invidiousdb ... done As you can see, both error out (when the DB isn't ready), but with 13 Invidious reconnect (something it doesn't do with 14 for WHATEVER reason) |
Maybe you can try this PR #2928 with the postgresql client version upgraded, that could fix the issue. |
I tried that and the problem still persists. |
Set the Postgres version to 13 as a temporary workaround for #2938
I encountered a memory issue as well.
|
I've found the problem! The postgres shard ( As a temporary fix, I'll see if a PR has to be made to invidious or to the upstream library (auth method should be automatically negociated afaik). |
@GaetanLepage This is probably related to #1791 / #3003. If the problem perists, please open a dedicated issue. |
Good job @SamantazFox ! Great to hear that the cause for this bug is now known :) Indeed, my problem was caused by QUIC. It works for me with QUIC disabled. |
I've been using the So it seems like this might have been fixed for a while, but there was a regression last week? |
Describe the bug
The recent commit (Feb 25, 2022) on a fresh installed docker environment (no existing images/volumes there) fails with this error message:
Error connecting to 'invidious-db:5432': Connection refused (Socket::ConnectError)
Steps to Reproduce
git clone https://github.com/iv-org/invidious.git
invidious
, and rundocker-compose up
Logs
The text was updated successfully, but these errors were encountered: