[PR #3604] [MERGED] Remove unnecessary episode_download_queue_updated socket event causing OOM #4033

Closed
opened 2026-04-25 00:18:03 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3604
Author: @mikiher
Created: 11/12/2024
Status: Merged
Merged: 11/13/2024
Merged by: @advplyr

Base: masterHead: episode-download-oom


📝 Commits (2)

  • b50d7f0 Remove unnecessary socket event causing OOM
  • 8626fa3 Add episode_download_queue_cleared socket event

📊 Changes

3 files changed (+8 additions, -7 deletions)

View changed files

📝 client/pages/item/_id/index.vue (+7 -0)
📝 client/pages/library/_library/podcast/download-queue.vue (+0 -5)
📝 server/managers/PodcastManager.js (+1 -2)

📄 Description

This fixes #3601.

The first commit removes an unnecessary socket event with a large payload that was emitted every time an episode download was queued. If a large number of episodes n were queued, this caused the creation of O(n^2) large objects to be created in quick sucession and queued for sending through the web socket, which caused an OOM for n=~2000.

The second commit resolves an unrelated bug in the podcast item page, in which if you pressed on the button to clear the download queue for a library item, the button and the message {0} Episode(s) queued for download were not removed after the download queue was emptied.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/3604 **Author:** [@mikiher](https://github.com/mikiher) **Created:** 11/12/2024 **Status:** ✅ Merged **Merged:** 11/13/2024 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `episode-download-oom` --- ### 📝 Commits (2) - [`b50d7f0`](https://github.com/advplyr/audiobookshelf/commit/b50d7f09278c74eeccffdff1ecc0f2eb4cb8f04f) Remove unnecessary socket event causing OOM - [`8626fa3`](https://github.com/advplyr/audiobookshelf/commit/8626fa3e00871555a80a647e058cd8f62ba2ea59) Add episode_download_queue_cleared socket event ### 📊 Changes **3 files changed** (+8 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `client/pages/item/_id/index.vue` (+7 -0) 📝 `client/pages/library/_library/podcast/download-queue.vue` (+0 -5) 📝 `server/managers/PodcastManager.js` (+1 -2) </details> ### 📄 Description This fixes #3601. The first commit removes an unnecessary socket event with a large payload that was emitted every time an episode download was queued. If a large number of episodes `n` were queued, this caused the creation of `O(n^2)` large objects to be created in quick sucession and queued for sending through the web socket, which caused an OOM for n=~2000. The second commit resolves an unrelated bug in the podcast item page, in which if you pressed on the button to clear the download queue for a library item, the button and the message `{0} Episode(s) queued for download` were not removed after the download queue was emptied. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:18:03 +02:00
adam closed this issue 2026-04-25 00:18:03 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4033