mattttvaughn / chronicle

GNU General Public License v3.0
217 stars 60 forks source link

Refreshing in Chronicle crashes Plex server for large libraries #2

Closed mattttvaughn closed 2 years ago

mattttvaughn commented 2 years ago

Steps to reproduce:

Expected behavior: Chronicle will update the library Actual behavior: Plex server will crash

Android version + device:

mattttvaughn commented 2 years ago

33 was a dupe of this but also reports that track fetches seem to be getting sent twice. Additional details on that ticket and details about solving the original problem below.

Crash was caused by Chronicle asking for list all tracks in the audiobook library without using any paging parameters - so a response containing details of 67093 tracks crashed the server when it ran out of memory putting the response together

Requests for this end point GET /library/sections/xxx/all need to be paged giving container size requested and the start index for the portion requested - normally client apps request library contents with 12 or 50 or 100 at a time max

Further, requests are doubled up

Feb 15, 2022 21:41:56.458 [18288] DEBUG - Request: [192.168.1.254:49900 (Subnet)] GET /library/sections/17/all?type=10 (57 live) TLS GZIP Signed-in Token (USERNAME) Feb 15, 2022 21:41:56.682 [19996] DEBUG - Request: [192.168.1.254:50008 (Subnet)] GET /library/sections/17/all?type=10 (57 live) TLS GZIP Signed-in Token (USERNAME)

pmayeur commented 2 years ago

@mattttvaughn pretty sure this one can be closed