podify-org / podify

Create podcasts from anything youtube-dl can handle
https://www.podify.org
GNU General Public License v3.0
290 stars 19 forks source link

Trouble with db after disk full issue #23

Closed metasikander closed 3 years ago

metasikander commented 3 years ago

i started a download to podify, but the disk i was using didn't have enough space so it never finished. i moved the container to another machine with more space, but if i try to download the same video i get a "request.create.error". image the video is not in the list. i guess there is a missmatch between the db and the frontend, but i'm not sure how to best fix this.

metasikander commented 3 years ago

log from web-container:

D, [2021-01-27T15:21:45.875654 #1] DEBUG -- : [aeaa159f-8a37-4995-bf83-91c37eeed54a] PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "requests_user_id_source_id_index"
DETAIL:  Key (user_id, source_id)=(1, 42) already exists.
 excluded from capture: DSN not set
F, [2021-01-27T15:21:45.876328 #1] FATAL -- : [aeaa159f-8a37-4995-bf83-91c37eeed54a]   
[aeaa159f-8a37-4995-bf83-91c37eeed54a] Sequel::UniqueConstraintViolation (PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "requests_user_id_source_id_index"
DETAIL:  Key (user_id, source_id)=(1, 42) already exists.
):
maxhollmann commented 3 years ago

The frontend doesn't retain state between reloads, so a mismatch there is unlikely.

I guess the easiest fix for this would be to start with a fresh DB. Since the downloads from the old DB won't be available anyways you're not really using data... Let me know if that's not possible for you and I can look into a less nuclear option ^^

metasikander commented 3 years ago

okay. i would like to keep the db, as everything works as expected except for that one video. i would prefer to not mess up peoples rss-feed with a reset. so if you have a simple way to fix this then i would highly appreciate it 😊

maxhollmann commented 3 years ago

Try opening a shell in either a web or worker container and run this:

rails runner "Request.where(user_id: 1, source_id: 41).destroy"

That should fix it. Let me know if it doesn't ;)

metasikander commented 3 years ago

that did something. i don't get the error anymore, but it still won't download the video. it just stays at "pending" and if i reload the page it's gone.

i appreciate the help you're giving me here, but it's not that big of a problem if you want to focus on something else. i can download videos from other sources, so i can find a way around it. 😊

maxhollmann commented 3 years ago

If only some sources don't download that's probably a problem with youtube-dl, I can't do much about that.