[BUG] Memory leak when creating "issues", with TV Shows that have large season numbers
See original GitHub issueDescription
Hi!
Whenever you create issues (and try to view the issue created afterwards) with a TV Show, that has high season numbers, like Season 2003
, Season 2004
and so on, Overseerr/nodejs will take up loads of memory within seconds.
Version
v1.28.0 (snapcraft)
Steps to Reproduce
16/02/2022 - Slight update
- Login to Overseerr
- Find a show with a large season number
- In my case, MythBusters
- Create an issue for
Season 2003
- Select All Episodes and Issue: Video
- Press Submit
- Either press “view issue” immediatly after creating it. – or –
- Press on the “Issue” tab, to view all created issues.
- Watch as your RAM usage explodes
Screenshots
Creating the issue https://imgbox.com/dwZoteT7
Trying to access the Issue tab after running a sudo snap restart overseerr
https://imgbox.com/VFTii82t
(updated the links, imgur is buggy atm)
Logs
No response
Platform
Overseerr is running on Ubuntu 21.10/impish
Device
Desktop
Operating System
Windows 11
Browser
Firefox
Additional Context
No relevant logs this time. Started from this thread: https://discord.com/channels/783137440809746482/789002037529804833/937119741376626719
Ending up creating this GH issue instead.
Edit - 16/02/2022
- If you run in to the same issue, and wondering how to edit your .db file, here’s a short guide for Linux. I don’t use my
root
user, so I just usesudo
with my “local”/“home” user:
Quick guide to fix the DB file So to clean the DB I used just a simple DB viewer / DB editor. In my case, I just chose the first one I found: https://github.com/sqlitebrowser/sqlitebrowser
The .db file usually lies in the /root/snap/overseerr
folder if you’re using Linux.
In my case, it lies in: /root/snap/overseerr/common/db
To be safe, shutdown the overseerr instance: sudo snap stop overseerr
Just download all the files in there.
Or copy them: sudo cp -R /root/snap/overseerr/common/db /home/user/path/db
and chown -R user:user /home/user/path/db
, if you don’t use your root user.
Open the db.sqlite3
with your DB viewer. If you use the one above, follow these steps to find the issue you want to delete (the one with the large season number):
- Open the
db.sqlite3
with DB Browser for SQLite - Select the
Browse Data
`tab - Find the
Table
and selectissue
- Find the issue with a large season number, and delete it
- Save the db-file. You’ll be left with just the
db.dqlite3
file in the folder you edited the db file in.
Then purge/delete the old .sqlite3*
files in /root/snap/overseerr/common/db
and re-upload the db file to whatever directory.
Then copy the db.sqlite3
file back to the /root/snap/overseerr/common/db
with sudo cp db.sqlite3 /root/snap/overseerr/common/db
, and remember to chown it back to the root user with sudo chown -R root:root /root/snap/overseerr/common/db
.
Start/restart overseerr again sudo snap start overseerr
, and rejoice that you can go into your issue section again, without everything crashing:
.
Code of Conduct
- I agree to follow Overseerr’s Code of Conduct
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:11
Top GitHub Comments
In case this gets re-opened when someone is able to reproduce it: I was hit by the same symptoms described here, except the trigger was a Request for a TV show with 176 seasons. House Hunters International (and yes, they’re numbered 1-176 on TMDb 🙄 the “why” is beyond me…). And since “requests” appear on the main page (under “Recent Requests”), I didn’t have to browse to any other page to trigger the memory “explosion” and subsequent crash:
I am running in Docker on linux, version 1.29.1
I was able to delete the relevant media_request and season_request rows by using the sqlite3 db client, which then let me browse the overseerr GUI without it crashing. Unfortunately I wasn’t able to reproduce after re-adding the request (after clearing data for the show), or adding an issue relating to the series (after doing a full Plex scan).
They will only get picked up if they are added with the TMDb season numbers in Plex. Otherwise, you’ll need to manually mark them as available. (If you want to discuss this issue further, Discord may be a better place to do so, so we can keep this issue on-topic.)