[Bug]: Home page fails to load on larger library #1925

Closed
opened 2026-04-25 00:01:27 +02:00 by adam · 4 comments
Owner

Originally created by @rossengeorgiev on GitHub (Apr 30, 2024).

Describe the issue

I've created a "large" library of ebooks (35k entries), and when I try to open the home page, the app stops working for a bit. Looking at the server I see a single thread maxing out CPU for a minute or two. After that the app recovers, but the home page never loads. Naturally, adding more resource makes no difference. The server is a VM with SSD storage and lots of ram, so pretty much ideal.

I've not looked at the source code, but I'm guessing the page does very expensive database queries.

When reconnecting to the audobookshelf server, or connecting for the first time, the home page is where you land. The library page works, but it still takes long time to load. Scanning that library initially took 12-16 hours (no book matching), which seems very slow as 35k entries is not that much.

Steps to reproduce the issue

  1. Large library of ebooks (35k entries)
  2. Attempt to load home page

Audiobookshelf version

v2.8.1

How are you running audiobookshelf?

Debian/PPA

Originally created by @rossengeorgiev on GitHub (Apr 30, 2024). ### Describe the issue I've created a "large" library of ebooks (35k entries), and when I try to open the home page, the app stops working for a bit. Looking at the server I see a single thread maxing out CPU for a minute or two. After that the app recovers, but the home page never loads. Naturally, adding more resource makes no difference. The server is a VM with SSD storage and lots of ram, so pretty much ideal. I've not looked at the source code, but I'm guessing the page does very expensive database queries. When reconnecting to the audobookshelf server, or connecting for the first time, the home page is where you land. The library page works, but it still takes long time to load. Scanning that library initially took 12-16 hours (no book matching), which seems very slow as 35k entries is not that much. ### Steps to reproduce the issue 1. Large library of ebooks (35k entries) 2. Attempt to load home page ### Audiobookshelf version v2.8.1 ### How are you running audiobookshelf? Debian/PPA
adam added the bug label 2026-04-25 00:01:27 +02:00
adam closed this issue 2026-04-25 00:01:28 +02:00
Author
Owner

@nichwall commented on GitHub (Apr 30, 2024):

The expensive part is converting the data from SQLite back to the data model that the API expects. The API/apps are planned to be rewritten, it just hasn't happened yet.

If you are willing to provide the SQLite database file, that would be helpful. You can either send it to advplyr (email on GH profile or Discord) or myself and I can pass it along.

https://github.com/advplyr/audiobookshelf/issues/2073

@nichwall commented on GitHub (Apr 30, 2024): The expensive part is converting the data from SQLite back to the data model that the API expects. The API/apps are planned to be rewritten, it just hasn't happened yet. If you are willing to provide the SQLite database file, that would be helpful. You can either send it to advplyr (email on GH profile or Discord) or myself and I can pass it along. https://github.com/advplyr/audiobookshelf/issues/2073
Author
Owner

@advplyr commented on GitHub (May 7, 2024):

Duplicate of #2073

@advplyr commented on GitHub (May 7, 2024): Duplicate of #2073
Author
Owner

@rossengeorgiev commented on GitHub (May 7, 2024):

Hi, how is #2073 a duplicate? It talks about version 2.4.0. I see lots of comments about different changes, but nothing like the issue here. The home page never loads for me, its not just slow. Happy to provide a database file for you to reproduce.

@rossengeorgiev commented on GitHub (May 7, 2024): Hi, how is #2073 a duplicate? It talks about version 2.4.0. I see lots of comments about different changes, but nothing like the issue here. The home page never loads for me, its not just slow. Happy to provide a database file for you to reproduce.
Author
Owner

@nichwall commented on GitHub (May 7, 2024):

This is the same issue that was originally introduced in 2.4.0 with the migration to SQLite. There have been a lot of optimizations since then, but this is the same issue. If you can provide the SQLite database for testing that would be helpful.

@nichwall commented on GitHub (May 7, 2024): This is the same issue that was originally introduced in 2.4.0 with the migration to SQLite. There have been a lot of optimizations since then, but this is the same issue. If you can provide the SQLite database for testing that would be helpful.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1925