Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plex Ratelimit on big libraries (?) #2173

Open
2 of 3 tasks
BLACK4585 opened this issue Jan 31, 2025 · 1 comment
Open
2 of 3 tasks

Plex Ratelimit on big libraries (?) #2173

BLACK4585 opened this issue Jan 31, 2025 · 1 comment

Comments

@BLACK4585
Copy link

Confirmation

  • I have read the README.md on the project homepage
  • I have checked if an identical issue or discussion already exists
  • I have tried downgrading to find version that can be used as a workaround

The problem

I already wrote this down in #2104, but I will insert it here again.

Hey,
I just discovered the program and now want to use it to sync my Trakt progress and lists against a big Plex library. My Plex Account is limited to 1 stream at a time.
I configured the program so that first, all my progress in Plex is overwritten by the Trakt progress.
It begins syncing, passes the first library with 101 media contents and then gets stuck at the next library with 2049 media contents at element 591 every time. I get an error message 401: Unauthorized. If you are interested in the whole stacktrace, lmk.

Could this be related to a firewall blocking the many requests at one time, or does the program use multiple users/agents which could trigger the Plex rate limit with 1 stream at a time?

---

I just ran a test, disabling the mentioned first library, but the sync progress stops at 591 media contents of the second library anyway.
Could this indicate that Plex (or the library) is interfering then?

---

I suppose this could also be a rate limit by the Plex API, as assumed before, as they might not like 2k requests in 30 seconds.
Thus, I would prefer to convert this into a (feature request) issue, since a cooldown in between different libraries and every 500 synced items or so.

Also, somebody marked my old issue as a duplicate of a Trakt API issue. This is not the case here I think, since I clearly get a 401 back from Plex, not Trakt:

ERROR    (401) unauthorized;
         https://45-131-79-xxxxxxxxxx.plex.direct:12125/:/progress?key=8878&identifier=com.plex
         app.plugins.library&time=7838203&state=stopped <html><head><title>Unauthorized</title></head><body><h1>401
         Unauthorized</h1></body></html>

Secondly, when you close issues please don't lock them, since I now needed to create another issue just to give you the details I already gave you a month ago or so, looking at #2172

Also, I have included a ? in the title as I don't obviously know if this is Plex issue or a firewall in front of Plex blocking something. That's why I am asking. In both cases could be a cooldown between every few hundred items as a new feature help there. Correct me if I'm wrong.

Steps to reproduce the behavior

Not sure, read my last paragraph above.

  1. Try to use the script on a large library, 2,4k movies in my case.

Error trace / logs


Expected behavior

To just sync my Trakt library to Plex.

Inspect of problematic items


Workarounds

No response

Config file contents

Install method

pipx

Version

0.32.2

Python Version

Python Version: 3.12.7 (tags/v3.12.7:0b05ead, Oct 1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)]

Plex Server Version

Plex Server version: 1.41.3.9232-434341a9d, updated at: 2024-12-03 09:41:46

Operating System and Version

Windows 11

@glensc
Copy link
Collaborator

glensc commented Feb 1, 2025

  1. edit the issue, remove the rants, I don't care and won't look at those abused issues.
  2. Use issue template correctly, you have not provided your config.
  3. As far I know plex server has no rate limits, enable plex server debug log and see it's logs
  4. Enable plextraktsync debug log and see the log file what's happening, the /progress call is not familiar.
  5. if the 8878 is id of media, you can try syncing that single item: plextraktsync sync --id=8878
  6. you can try syncing by specific libraries plextraktsync sync --library="Library Name" or adjust excluded libraries via config to minimize impact and find if it creates any difference.
  7. rate limit status code is typically 429 not 401. 401 may indicate getting blocked. do you get unblocked at some point?
  8. how is this achieved? "My Plex Account is limited to 1 stream at a time."
  9. "101 media contents" what kind of library" movies? tv shows?
  10. "Could this be related to a firewall blocking the many requests at one time" no, response looks like from plex server. see ple x server logs
  11. this program doesn't use any streams
  12. this program is single threaded
  13. 2,4k movies is not a large library

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

No branches or pull requests

2 participants