Skip to content

FIX: Trying to start NUTcase while offline blows up spectacularly#77

Open
weedy wants to merge 2 commits intoArthurMitchell42:mainfrom
weedy:main
Open

FIX: Trying to start NUTcase while offline blows up spectacularly#77
weedy wants to merge 2 commits intoArthurMitchell42:mainfrom
weedy:main

Conversation

@weedy
Copy link
Copy Markdown

@weedy weedy commented Mar 9, 2026

Add timeouts so threads don't dead lock.


After this got fixed I figured out I need to adjust uWSGI config with env vars.

uWSGI was configured to spin up 4 workers concurrently in lazy-apps mode.
When DNS failed and delayed the startup, all 4 workers attempted to initialize the local SQLite database simultaneously. SQLite does not support highly concurrent writes, resulting in sqlite3.OperationalError: database is locked, which then caused the APScheduler to throw a RuntimeError and also crashes the entire container.

I don't know how deep you want to go with this.
But my internet is currently down and I got stuck dealing with broken homelab stuff all over the place.

weedy added 2 commits March 8, 2026 20:37
Executes Get_Update_String on startup to check for newer versions by querying the GitHub API.

Because the DNS was unreachable, urllib.request.urlopen(URL) hung indefinitely waiting for a response, ultimately throwing a socket.gaierror: [Errno -3] Temporary failure in name resolution.

FIX: Add a timeout so restarting the container when the internet is down allows you to continue.

Signed-off-by: weedy <weedy2887@gmail.com>
Executes Get_Update_String on startup to check for newer versions by querying the GitHub API.

Because the DNS was unreachable, urllib.request.urlopen(URL) hung indefinitely waiting for a response, ultimately throwing a socket.gaierror: [Errno -3] Temporary failure in name resolution.

FIX: Add a timeout so restarting the container when the internet is down allows you to continue.

Signed-off-by: weedy <weedy2887@gmail.com>
@weedy weedy changed the title FIX FIX: Trying to start NUTcase while offline blows up spectacularly Mar 9, 2026
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.

1 participant