With the ever-growing number of third-party tools accessing the Plex API, I wish Plex would just reject API calls when the database is busy. Too often, I would get the dreaded “Sleeping for 200ms” repeated several hundred times, and it would lock up the server.
When that happens, it’s clear that the database can’t handle that many requests. So for the sake of Plex’s own stability, it would be great if it’s able to protect itself and just rate-limited those API requests when the Plex database is overloaded.
I mean, this problem will continue to fester and get worse as more and more apps are created that access the Plex API.
And yes, it would break those apps that get rate-limited, but that would force those third-party app developers to stay within bounds, develop better queueing methods, and/or rate-limit themselves.