Skip to content

Fix SABnzbd NZB upload timeouts - #305

Closed
connor2k wants to merge 1 commit into
kikootwo:mainfrom
connor2k:fix/sabnzbd-content-length
Closed

connor2k wants to merge 1 commit into
kikootwo:mainfrom
connor2k:fix/sabnzbd-content-length

Conversation

@connor2k

Copy link
Copy Markdown
Contributor

Sets the multipart Content-Length header when uploading NZB files to SABnzbd. Without an explicit content length, SABnzbd can accept the NZB while the HTTP request remains open until Axios times out, causing the job queue to retry and submit duplicate downloads.

@kikootwo kikootwo added the needs-info Waiting on the reporter for details (14-day clock) label Oct 19, 2026
@kikootwo

Copy link
Copy Markdown
Owner

Thanks for this @connor2k.

The axios version RMAB ships already sets Content-Length for this upload, so on its own this change shouldn't alter what SABnzbd receives. That said, a duplicate NZB can still happen when an upload times out and gets retried after SABnzbd already accepted it, and that's worth fixing, just differently.

To figure out what you're actually hitting:

  • SABnzbd version?
  • The RMAB log lines around the timeout?
  • Is there a reverse proxy between RMAB and SABnzbd?
  • If you can grab them, the request headers SABnzbd received for addfile.

@kikootwo

Copy link
Copy Markdown
Owner

The retry part of this is now tracked in #329. The questions above still help pin down what you're hitting, so if you can grab those, please drop them here.

@connor2k

Copy link
Copy Markdown
Contributor Author

Here’s the additional information from my setup:

SABnzbd version: 5.1.1

SABnzbd image: linuxserver/sabnzbd:latest

ReadMeABook and SABnzbd are both on the same Docker network

ReadMeABook can resolve sabnzbd directly to its Docker IP and receives HTTP/1.1 200 OK from http://sabnzbd:8080/

There is no reverse proxy between ReadMeABook and SABnzbd for this connection; it is direct Docker-to-Docker networking.

I also searched the retained ReadMeABook logs for 30000ms, timeout, addfile, and SABnzbd. Unfortunately, the original timeout event is no longer present in the retained logs. The current logs only show normal NZB search/filter activity for SABnzbd.

I have not yet captured the request headers for an actual mode=addfile request. I can reproduce/capture those if that would still be useful.

@kikootwo

Copy link
Copy Markdown
Owner

Thanks for the details @connor2k, that helps a lot.

A direct Docker network with no proxy on SABnzbd 5.1.1 rules out a proxy stripping headers. The upload already sends a Content-Length header today, so this change doesn't alter what goes over the wire. I'm going to close this one in favor of #329, which fixes the part that actually hurts: an upload that times out gets retried and adds the NZB twice.

If the timeout shows up again, the request headers and the SABnzbd log lines from that moment would be welcome on #329.

@kikootwo kikootwo closed this Oct 19, 2026
@kikootwo

Copy link
Copy Markdown
Owner

@connor2k the #329 fix is out in v1.2.12, landed in #480 with you as co-author: https://github.com/kikootwo/ReadMeABook/releases/tag/v1.2.12

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

Labels

needs-info Waiting on the reporter for details (14-day clock)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants