-
Notifications
You must be signed in to change notification settings - Fork 32
PlexSyncList Container Crashing Due to Spotify API Rate Limit and Error Handling Issues #68
Description
Hello,
I am experiencing consistent crashes with the PlexSyncList Docker container (rnagabhyrava/plexplaylistsync:latest). The primary issue seems to be related to the handling of Spotify API requests, leading to rate limit errors (HTTP 429) and occasional 502 errors.
Environment
Docker version: [Container Manager 20.10.23-1437]
Host OS: [Synology DSM]
PlexSyncList version: Latest (rnagabhyrava/plexplaylistsync:latest)
Configuration Details
Here's the relevant part of my docker-compose.yml:
services:
playlistSync:
image: rnagabhyrava/plexplaylistsync:latest
container_name: playlistSync
volumes:
- /volume1/data/media/missing:/data
environment:
- PLEX_URL=[REDACTED]
- PLEX_TOKEN=[REDACTED]
- WRITE_MISSING_AS_CSV=1
- APPEND_SERVICE_SUFFIX=1
- ADD_PLAYLIST_POSTER=1
- ADD_PLAYLIST_DESCRIPTION=1
- APPEND_INSTEAD_OF_SYNC=0
- SECONDS_TO_WAIT=84000
- SPOTIFY_CLIENT_ID=[REDACTED]
- SPOTIFY_CLIENT_SECRET=[REDACTED]
- SPOTIFY_USER_ID=[REDACTED]
restart: unless-stopped
network_mode: synobridge
Observed Behavior
The container consistently crashes or encounters issues during its operation.
The logs indicate errors related to Spotify's API, specifically HTTP status code 429, suggesting rate limit exceeding.
There are also mentions of "too many 502 error responses" and "max retries exceeded" errors.
Troubleshooting Steps Taken
Verified SECONDS_TO_WAIT is set to 84000 seconds (23.3 hours), which seems adequate to avoid rate limiting issues under normal circumstances.
Reviewed Docker configuration for any misconfigurations or missing settings.
Possible Causes
The application might be making multiple requests in a short period that are not governed by the SECONDS_TO_WAIT setting.
The error handling for Spotify API requests (especially for HTTP 429 and 502 errors) may not be robust, leading to crashes.
Request for Assistance
Could you please help in identifying why these errors are occurring and suggest any potential fixes or workarounds? Additionally, if there are any specific logs or further information you need, I am happy to provide them.
Thank you for your time and assistance with this issue.