[GH-ISSUE #35] Requests taking forever #23

Open
opened 2026-02-27 20:07:44 +03:00 by kerem · 21 comments
Owner

Originally created by @WurdahMekanik on GitHub (Feb 15, 2026).
Original GitHub issue: https://github.com/misiektoja/spotify_monitor/issues/35

I've had problems with this not being able to consistently capture real-time activity in the past couple weeks. I'm not sure if this is a Spotify issue or something else, but I've traced it down to the SESSION.get() calls seeming to take forever to return, usually on the order of an hour or more. I'm using use cookie + oauth_app to authenticate, have python 3.14.2 installed, and IPv6 disabled.

Originally created by @WurdahMekanik on GitHub (Feb 15, 2026). Original GitHub issue: https://github.com/misiektoja/spotify_monitor/issues/35 I've had problems with this not being able to consistently capture real-time activity in the past couple weeks. I'm not sure if this is a Spotify issue or something else, but I've traced it down to the SESSION.get() calls seeming to take _forever_ to return, usually on the order of an hour or more. I'm using use cookie + oauth_app to authenticate, have python 3.14.2 installed, and IPv6 disabled.
Author
Owner

@misiektoja commented on GitHub (Feb 15, 2026):

Strange issue, I have never come across it before. Are there any errors, like 429? Are you using any VPN, proxy or corporate network? Are you on Windows or Linux/macOS ?

The only thing that comes to mind is the long 429 retry-after response returned by Spotify in your case, perhaps due to some proxy.

I capped it at 60 seconds in the newest dev version. Can you try it with the new --debug flag and share the log when the issue happens again? If you installed via pip:

pip uninstall spotify_monitor -y
pip install git+https://github.com/misiektoja/spotify_monitor.git@dev
<!-- gh-comment-id:3905472996 --> @misiektoja commented on GitHub (Feb 15, 2026): Strange issue, I have never come across it before. Are there any errors, like 429? Are you using any VPN, proxy or corporate network? Are you on Windows or Linux/macOS ? The only thing that comes to mind is the long 429 retry-after response returned by Spotify in your case, perhaps due to some proxy. I capped it at 60 seconds in the newest dev version. Can you try it with the new `--debug` flag and share the log when the issue happens again? If you installed via pip: ``` pip uninstall spotify_monitor -y pip install git+https://github.com/misiektoja/spotify_monitor.git@dev ```
Author
Owner

@tomballgithub commented on GitHub (Feb 16, 2026):

FWIW, I was seeing this Friday night out of the blue. I wasn't sure if it was related to the latest code changes.

Super frustrated, I just left it alone and it was working correctly on Saturday morning. I attributed it to the Spotify API or something else unknown.

However, it was really odd, because I noticed the same thing, that it was not timing out as it should have been and was taking 'forever'.

While debugging, it sure looked like requests issue not timing out as it should, unless it was invisibly doing a backoff/retry.

I noticed instagram_monitor taking 24 mins to complete a request and then timeout. If that happens invisibly, it sure would explain what we noticed.

[DEBUG 21:44:31] [YYY] Fetching profile data from Instagram API...
[DEBUG 21:44:35] [YYY] * Back-off 71s after 400
[DEBUG 21:45:48] [YYY] * Back-off 132s after 400
[DEBUG 21:48:04] [YYY] * Back-off 253s after 400
[DEBUG 21:52:24] [YYY] * Back-off 82s after 400
[DEBUG 21:53:49] [YYY] * Back-off 124s after 400
[DEBUG 21:55:55] [YYY] * Back-off 255s after 400
[DEBUG 22:00:16] [YYY] * Back-off 81s after 400
[DEBUG 22:01:40] [YYY] * Back-off 128s after 400
[DEBUG 22:03:51] [YYY] * Back-off 267s after 400
[DEBUG 22:08:21] [YYY] Formatting error message for QueryReturnedNotFoundException: JSON Query to web/search/topsearch/: Giving up after multiple 429/checkpoint

<!-- gh-comment-id:3905649936 --> @tomballgithub commented on GitHub (Feb 16, 2026): FWIW, I was seeing this Friday night out of the blue. I wasn't sure if it was related to the latest code changes. Super frustrated, I just left it alone and it was working correctly on Saturday morning. I attributed it to the Spotify API or something else unknown. However, it was really odd, because I noticed the same thing, that it was not timing out as it should have been and was taking 'forever'. While debugging, it sure looked like requests issue not timing out as it should, unless it was invisibly doing a backoff/retry. I noticed instagram_monitor taking 24 mins to complete a request and then timeout. If that happens invisibly, it sure would explain what we noticed. ``` [DEBUG 21:44:31] [YYY] Fetching profile data from Instagram API... [DEBUG 21:44:35] [YYY] * Back-off 71s after 400 [DEBUG 21:45:48] [YYY] * Back-off 132s after 400 [DEBUG 21:48:04] [YYY] * Back-off 253s after 400 [DEBUG 21:52:24] [YYY] * Back-off 82s after 400 [DEBUG 21:53:49] [YYY] * Back-off 124s after 400 [DEBUG 21:55:55] [YYY] * Back-off 255s after 400 [DEBUG 22:00:16] [YYY] * Back-off 81s after 400 [DEBUG 22:01:40] [YYY] * Back-off 128s after 400 [DEBUG 22:03:51] [YYY] * Back-off 267s after 400 [DEBUG 22:08:21] [YYY] Formatting error message for QueryReturnedNotFoundException: JSON Query to web/search/topsearch/: Giving up after multiple 429/checkpoint ```
Author
Owner

@misiektoja commented on GitHub (Feb 16, 2026):

Ok, it confirms my suspicion. Most likely, Spotify returned a 429 backoff with a very long retry-after due to some issues on their side and we behaved nicely by waiting the time indicated by Spotify (since doing it faster will typically result in another 429). Right now, it is capped at a maximum of 60 seconds, so if Spotify returns something longer, we ignore it and retry.

<!-- gh-comment-id:3905676354 --> @misiektoja commented on GitHub (Feb 16, 2026): Ok, it confirms my suspicion. Most likely, Spotify returned a 429 backoff with a very long retry-after due to some issues on their side and we behaved nicely by waiting the time indicated by Spotify (since doing it faster will typically result in another 429). Right now, it is capped at a maximum of 60 seconds, so if Spotify returns something longer, we ignore it and retry.
Author
Owner

@tomballgithub commented on GitHub (Feb 16, 2026):

FWIW, I made these changes to instagram_monitor and it took the backoff/retry cycle down to 8 mins (from 24, which is 3 total tries), which is still too long.
I added max_connection_attempts=1, request_timeout=30, fatal_status_codes=[302,400,401,429] at the end

Instaloader also has settings for these, which I will try next:
request_timeout
and
rate_controller

        # bot = instaloader.Instaloader(user_agent=USER_AGENT, iphone_support=True, quiet=True) 
        bot = instaloader.Instaloader(user_agent=USER_AGENT, iphone_support=True, quiet=True, download_videos=False, download_pictures=False, download_video_thumbnails=False, download_geotags=False, download_comments=False, max_connection_attempts=1, request_timeout=30, fatal_status_codes=[302,400,401,429] )

[DEBUG 10:21:48] [YYY] Fetching profile data from Instagram API...
[DEBUG 10:21:52] [YYY] * Back-off 72s after 400
[DEBUG 10:23:06] [YYY] * Back-off 125s after 400
[DEBUG 10:25:13] [YYY] * Back-off 270s after 400
[DEBUG 10:29:46] [YYY] Formatting error message for QueryReturnedNotFoundException: JSON Query to web/search/topsearch/: Giving up after multiple 429/checkpoint

<!-- gh-comment-id:3905705694 --> @tomballgithub commented on GitHub (Feb 16, 2026): FWIW, I made these changes to instagram_monitor and it took the backoff/retry cycle down to 8 mins (from 24, which is 3 total tries), which is still too long. I added `max_connection_attempts=1, request_timeout=30, fatal_status_codes=[302,400,401,429]` at the end Instaloader also has settings for these, which I will try next: `request_timeout ` and `rate_controller` ``` # bot = instaloader.Instaloader(user_agent=USER_AGENT, iphone_support=True, quiet=True) bot = instaloader.Instaloader(user_agent=USER_AGENT, iphone_support=True, quiet=True, download_videos=False, download_pictures=False, download_video_thumbnails=False, download_geotags=False, download_comments=False, max_connection_attempts=1, request_timeout=30, fatal_status_codes=[302,400,401,429] ) ``` ``` [DEBUG 10:21:48] [YYY] Fetching profile data from Instagram API... [DEBUG 10:21:52] [YYY] * Back-off 72s after 400 [DEBUG 10:23:06] [YYY] * Back-off 125s after 400 [DEBUG 10:25:13] [YYY] * Back-off 270s after 400 [DEBUG 10:29:46] [YYY] Formatting error message for QueryReturnedNotFoundException: JSON Query to web/search/topsearch/: Giving up after multiple 429/checkpoint ```
Author
Owner

@tomballgithub commented on GitHub (Feb 16, 2026):

Seeing this in debug mode, is it expected (3 retries, 3 failures)?

I'm seeing the really long hangups right now.

[DEBUG 16:34:36] Loop tick: token_source=cookie, check_interval=30, error_interval=180
[DEBUG 16:34:36] Refreshing Spotify access token via sp_dc (attempt 1/3)
[DEBUG 16:34:36] HTTP HEAD https://open.spotify.com/ [server time] timeout=15
[DEBUG 16:34:37] HTTP HEAD https://open.spotify.com/ -> 200
[DEBUG 16:34:37] Token refresh attempt failed: max() iterable argument is empty
[DEBUG 16:34:47] Refreshing Spotify access token via sp_dc (attempt 2/3)
[DEBUG 16:34:47] HTTP HEAD https://open.spotify.com/ [server time] timeout=15
[DEBUG 16:34:47] HTTP HEAD https://open.spotify.com/ -> 200
[DEBUG 16:34:47] Token refresh attempt failed: max() iterable argument is empty
[DEBUG 16:34:57] Refreshing Spotify access token via sp_dc (attempt 3/3)
[DEBUG 16:34:57] HTTP HEAD https://open.spotify.com/ [server time] timeout=15
[DEBUG 16:34:58] HTTP HEAD https://open.spotify.com/ -> 200
[DEBUG 16:34:58] Token refresh attempt failed: max() iterable argument is empty
Fetching Spotify web-player TOTP secrets from URL: https://XXX/spotify/secrets/secretDict.json
[DEBUG 16:34:58] HTTP GET https://XXX/spotify/secrets/secretDict.json [secrets update]
[DEBUG 16:34:59] HTTP GET https://XXX/spotify/secrets/secretDict.json -> 200

Before this, I was getting the following, so I restarted:

OK until here...
Timestamp:                      Mon 16 Feb 2026, 14:42:03
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
* Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/AAA
Timestamp:                      Mon 16 Feb 2026, 15:36:40
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
* Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/BBB
Timestamp:                      Mon 16 Feb 2026, 15:44:42
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
* Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/CCC
Timestamp:                      Mon 16 Feb 2026, 15:52:45
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
* Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/YYY
Timestamp:                      Mon 16 Feb 2026, 16:00:48
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
* Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/YYY
Timestamp:                      Mon 16 Feb 2026, 16:08:50
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
* Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/YYY
Timestamp:                      Mon 16 Feb 2026, 16:16:52
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
* Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/YYY
Timestamp:                      Mon 16 Feb 2026, 16:24:54
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
* Error, retrying in 3 minutes: 401 Client Error: Unauthorized for url: https://api.spotify.com/v1/tracks/YYY
Timestamp:                      Mon 16 Feb 2026, 16:30:55
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
<!-- gh-comment-id:3910798979 --> @tomballgithub commented on GitHub (Feb 16, 2026): Seeing this in debug mode, is it expected (3 retries, 3 failures)? I'm seeing the really long hangups right now. ``` [DEBUG 16:34:36] Loop tick: token_source=cookie, check_interval=30, error_interval=180 [DEBUG 16:34:36] Refreshing Spotify access token via sp_dc (attempt 1/3) [DEBUG 16:34:36] HTTP HEAD https://open.spotify.com/ [server time] timeout=15 [DEBUG 16:34:37] HTTP HEAD https://open.spotify.com/ -> 200 [DEBUG 16:34:37] Token refresh attempt failed: max() iterable argument is empty [DEBUG 16:34:47] Refreshing Spotify access token via sp_dc (attempt 2/3) [DEBUG 16:34:47] HTTP HEAD https://open.spotify.com/ [server time] timeout=15 [DEBUG 16:34:47] HTTP HEAD https://open.spotify.com/ -> 200 [DEBUG 16:34:47] Token refresh attempt failed: max() iterable argument is empty [DEBUG 16:34:57] Refreshing Spotify access token via sp_dc (attempt 3/3) [DEBUG 16:34:57] HTTP HEAD https://open.spotify.com/ [server time] timeout=15 [DEBUG 16:34:58] HTTP HEAD https://open.spotify.com/ -> 200 [DEBUG 16:34:58] Token refresh attempt failed: max() iterable argument is empty Fetching Spotify web-player TOTP secrets from URL: https://XXX/spotify/secrets/secretDict.json [DEBUG 16:34:58] HTTP GET https://XXX/spotify/secrets/secretDict.json [secrets update] [DEBUG 16:34:59] HTTP GET https://XXX/spotify/secrets/secretDict.json -> 200 ``` Before this, I was getting the following, so I restarted: ``` OK until here... Timestamp: Mon 16 Feb 2026, 14:42:03 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── * Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/AAA Timestamp: Mon 16 Feb 2026, 15:36:40 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── * Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/BBB Timestamp: Mon 16 Feb 2026, 15:44:42 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── * Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/CCC Timestamp: Mon 16 Feb 2026, 15:52:45 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── * Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/YYY Timestamp: Mon 16 Feb 2026, 16:00:48 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── * Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/YYY Timestamp: Mon 16 Feb 2026, 16:08:50 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── * Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/YYY Timestamp: Mon 16 Feb 2026, 16:16:52 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── * Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/YYY Timestamp: Mon 16 Feb 2026, 16:24:54 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── * Error, retrying in 3 minutes: 401 Client Error: Unauthorized for url: https://api.spotify.com/v1/tracks/YYY Timestamp: Mon 16 Feb 2026, 16:30:55 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── ```
Author
Owner

@tomballgithub commented on GitHub (Feb 16, 2026):

Took 5 minutes for this:

[DEBUG 16:35:01] HTTP GET https://api.spotify.com/v1/tracks/XXX [track info] headers={'Authorization': 'Bear...mc', 'Us
[DEBUG 16:40:02] HTTP GET https://api.spotify.com/v1/tracks/XXX [track info] -> 429
* Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/XXX
Timestamp:                      Mon 16 Feb 2026, 16:40:02
<!-- gh-comment-id:3910803604 --> @tomballgithub commented on GitHub (Feb 16, 2026): Took 5 minutes for this: ``` [DEBUG 16:35:01] HTTP GET https://api.spotify.com/v1/tracks/XXX [track info] headers={'Authorization': 'Bear...mc', 'Us [DEBUG 16:40:02] HTTP GET https://api.spotify.com/v1/tracks/XXX [track info] -> 429 * Error, retrying in 3 minutes: 429 Client Error: Too Many Requests for url: https://api.spotify.com/v1/tracks/XXX Timestamp: Mon 16 Feb 2026, 16:40:02 ```
Author
Owner

@tomballgithub commented on GitHub (Feb 16, 2026):

I even tried with a new sp_dc

<!-- gh-comment-id:3910809150 --> @tomballgithub commented on GitHub (Feb 16, 2026): I even tried with a new sp_dc
Author
Owner

@tomballgithub commented on GitHub (Feb 16, 2026):

Here is the offending line:

    ver = TOTP_VER or max(map(int, SECRET_CIPHER_DICT))
                      ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: max() iterable argument is empty

And in my .conf, because I thought previously you told me to comment out the 61 to force it to fetch an update from the CIPHER_DICT_URL rather than trying to use a possibly old DICT.

It works fine if I uncomment and don't have a blank DICT

SECRET_CIPHER_DICT = {
#    "61": [44, 55, 47, 42, 70, 40, 34, 114, 76, 74, 50, 111, 120, 97, 75, 76, 94, 102, 43, 69, 49, 120, 118, 80, 64, 78],
}

<!-- gh-comment-id:3910820210 --> @tomballgithub commented on GitHub (Feb 16, 2026): Here is the offending line: ``` ver = TOTP_VER or max(map(int, SECRET_CIPHER_DICT)) ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: max() iterable argument is empty ``` And in my .conf, because I thought previously you told me to comment out the 61 to force it to fetch an update from the CIPHER_DICT_URL rather than trying to use a possibly old DICT. It works fine if I uncomment and don't have a blank DICT ``` SECRET_CIPHER_DICT = { # "61": [44, 55, 47, 42, 70, 40, 34, 114, 76, 74, 50, 111, 120, 97, 75, 76, 94, 102, 43, 69, 49, 120, 118, 80, 64, 78], } ```
Author
Owner

@tomballgithub commented on GitHub (Feb 16, 2026):

But it is still hanging for 5 minutes in the same spot, fetching a track.

Cookie mode

<!-- gh-comment-id:3910822395 --> @tomballgithub commented on GitHub (Feb 16, 2026): But it is still hanging for 5 minutes in the same spot, fetching a track. Cookie mode
Author
Owner

@WurdahMekanik commented on GitHub (Feb 16, 2026):

Mine suddenly seems to be working just fine.

No VPN, running on Linux, typically running on two different machines on two different networks (my home can have uptime issues, but I don't access the other machine as often)

However, over the weekend it seemed to be the case that it hung for exactly 24 hours (I saw timestamp output at a particular time, then an error sometime later, and the next time I saw a timestamp in the logs was 24 hours from the previous timestamp).

<!-- gh-comment-id:3910837393 --> @WurdahMekanik commented on GitHub (Feb 16, 2026): Mine suddenly seems to be working just fine. No VPN, running on Linux, typically running on two different machines on two different networks (my home can have uptime issues, but I don't access the other machine as often) However, over the weekend it seemed to be the case that it hung for exactly 24 hours (I saw timestamp output at a particular time, then an error sometime later, and the next time I saw a timestamp in the logs was 24 hours from the previous timestamp).
Author
Owner

@tomballgithub commented on GitHub (Feb 16, 2026):

Client mode with protobuf hangs in the same place. I am seeing this at startup when it's trying to fetch info on the current user's track or last track.

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[DEBUG 16:53:53] Loop tick: token_source=client, check_interval=30, error_interval=180
[DEBUG 16:53:53] Attempting to refresh/get client token before client auth
[DEBUG 16:53:53] HTTP POST https://clienttoken.spotify.com/v1/clienttoken [client token] app_version=1.2.20.95607.g36435cfe, device_overri
[DEBUG 16:53:53] HTTP POST https://clienttoken.spotify.com/v1/clienttoken [client token] -> 200
[DEBUG 16:53:53] Client token refreshed successfully, ttl=1209600s
[DEBUG 16:53:53] HTTP POST https://login5.spotify.com/v3/login [client auth] headers={'Host': 'login5.spotify.com', 'Connection': 'keep-al
[DEBUG 16:53:54] HTTP POST https://login5.spotify.com/v3/login [client auth] -> 200
[DEBUG 16:53:54] OAuth app access token refreshed successfully
[DEBUG 16:53:54] HTTP GET https://guc-spclient.spotify.com/presence-view/v1/buddylist [buddylist] headers={'Authorization': 'Bear...Oi', '
[DEBUG 16:53:54] HTTP GET https://guc-spclient.spotify.com/presence-view/v1/buddylist [buddylist] -> 200
[DEBUG 16:53:54] Friend lookup result: found=True
[DEBUG 16:53:54] HTTP GET https://api.spotify.com/v1/tracks/0lTn7yYpzftkx4UzNNwVby [track info] headers={'Authorization': 'Bear...mc', 'Us

<!-- gh-comment-id:3910843201 --> @tomballgithub commented on GitHub (Feb 16, 2026): Client mode with protobuf hangs in the same place. I am seeing this at startup when it's trying to fetch info on the current user's track or last track. ``` ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── [DEBUG 16:53:53] Loop tick: token_source=client, check_interval=30, error_interval=180 [DEBUG 16:53:53] Attempting to refresh/get client token before client auth [DEBUG 16:53:53] HTTP POST https://clienttoken.spotify.com/v1/clienttoken [client token] app_version=1.2.20.95607.g36435cfe, device_overri [DEBUG 16:53:53] HTTP POST https://clienttoken.spotify.com/v1/clienttoken [client token] -> 200 [DEBUG 16:53:53] Client token refreshed successfully, ttl=1209600s [DEBUG 16:53:53] HTTP POST https://login5.spotify.com/v3/login [client auth] headers={'Host': 'login5.spotify.com', 'Connection': 'keep-al [DEBUG 16:53:54] HTTP POST https://login5.spotify.com/v3/login [client auth] -> 200 [DEBUG 16:53:54] OAuth app access token refreshed successfully [DEBUG 16:53:54] HTTP GET https://guc-spclient.spotify.com/presence-view/v1/buddylist [buddylist] headers={'Authorization': 'Bear...Oi', ' [DEBUG 16:53:54] HTTP GET https://guc-spclient.spotify.com/presence-view/v1/buddylist [buddylist] -> 200 [DEBUG 16:53:54] Friend lookup result: found=True [DEBUG 16:53:54] HTTP GET https://api.spotify.com/v1/tracks/0lTn7yYpzftkx4UzNNwVby [track info] headers={'Authorization': 'Bear...mc', 'Us ```
Author
Owner

@misiektoja commented on GitHub (Feb 16, 2026):

Wow, they are essentially aggressively throttling the traffic with 429s, the same as Instagram. Those 3 failed retries were actually a bug I was not aware of, fixed in 375c5293d2, it should save you 3 requests ;-)

<!-- gh-comment-id:3910846081 --> @misiektoja commented on GitHub (Feb 16, 2026): Wow, they are essentially aggressively throttling the traffic with 429s, the same as Instagram. Those 3 failed retries were actually a bug I was not aware of, fixed in 375c5293d2714, it should save you 3 requests ;-)
Author
Owner

@misiektoja commented on GitHub (Feb 16, 2026):

What is interesting is we actually get 429s when using the official OAuth app token / Client Credentials flow (/v1/tracks API calls), so it appears the announced February changes also introduced some limit on the number of requests.

However, I have two instances of spotify_profile_monitor (checking every 6 hours) and one instance of spotify_monitor (checking every 60 seconds) running and they are all good so far. Maybe increasing the check interval can help?

<!-- gh-comment-id:3910889571 --> @misiektoja commented on GitHub (Feb 16, 2026): What is interesting is we actually get 429s when using the official OAuth app token / Client Credentials flow (`/v1/tracks` API calls), so it appears the announced February changes also introduced some limit on the number of requests. However, I have two instances of spotify_profile_monitor (checking every 6 hours) and one instance of spotify_monitor (checking every 60 seconds) running and they are all good so far. Maybe increasing the check interval can help?
Author
Owner

@tomballgithub commented on GitHub (Feb 16, 2026):

I cannot even get started, so I am not sure the check interval will help

<!-- gh-comment-id:3910897392 --> @tomballgithub commented on GitHub (Feb 16, 2026): I cannot even get started, so I am not sure the check interval will help
Author
Owner

@tomballgithub commented on GitHub (Feb 16, 2026):

Hmm, my spotify_profile_monitor is still working, even if I restart it

<!-- gh-comment-id:3910901247 --> @tomballgithub commented on GitHub (Feb 16, 2026): Hmm, my spotify_profile_monitor is still working, even if I restart it
Author
Owner

@misiektoja commented on GitHub (Feb 16, 2026):

I guess you need to wait a couple of minutes for it to release the quota limit for you.

In spotify_profile_monitor, we use slightly different calls. The /v1/tracks endpoint is only used to check token validity, if I remember correctly.

<!-- gh-comment-id:3910911712 --> @misiektoja commented on GitHub (Feb 16, 2026): I guess you need to wait a couple of minutes for it to release the quota limit for you. In spotify_profile_monitor, we use slightly different calls. The /v1/tracks endpoint is only used to check token validity, if I remember correctly.
Author
Owner

@tomballgithub commented on GitHub (Feb 16, 2026):

I just verified and spotify_profile_monitor is not using this API period, even to check token validity:
https://api.spotify.com/v1/tracks/YYY

In cookie mode, it seems to be using:
https://guc-spclient.spotify.com/presence-view/v1/buddylist

I verified this via debug print statements anywhere referencing the /tracks/ api

<!-- gh-comment-id:3910934082 --> @tomballgithub commented on GitHub (Feb 16, 2026): I just verified and spotify_profile_monitor is not using this API period, even to check token validity: `https://api.spotify.com/v1/tracks/YYY` In cookie mode, it seems to be using: `https://guc-spclient.spotify.com/presence-view/v1/buddylist` I verified this via debug print statements anywhere referencing the /tracks/ api
Author
Owner

@tomballgithub commented on GitHub (Feb 17, 2026):

I tried again an hour later, same thing. I just tried again 5 hours later, and it worked. There's definitely a behavior change.

Is there a way to avoid these 5+ minute timeouts? The most recent change to cap at 60 seconds still resulted in 5 mins.

I changed to SPOTIFY_CHECK_INTERVAL = 60 at your recommendation.
I'd been running at 30 for a year without issue.

<!-- gh-comment-id:3912224116 --> @tomballgithub commented on GitHub (Feb 17, 2026): I tried again an hour later, same thing. I just tried again 5 hours later, and it worked. There's definitely a behavior change. Is there a way to avoid these 5+ minute timeouts? The most recent change to cap at 60 seconds still resulted in 5 mins. I changed to SPOTIFY_CHECK_INTERVAL = 60 at your recommendation. I'd been running at 30 for a year without issue.
Author
Owner
<!-- gh-comment-id:3916200316 --> @WurdahMekanik commented on GitHub (Feb 17, 2026): It seems like this is definitely a Spotify problem that quite a few people are upset about: https://community.spotify.com/t5/Spotify-for-Developers/Low-number-of-requests-leading-to-429-response/td-p/7338415 https://community.spotify.com/t5/Spotify-for-Developers/Severe-429-Errors-in-Apps-with-Granted-Quota-Extension/td-p/7340780
Author
Owner

@tomballgithub commented on GitHub (Feb 17, 2026):

Thanks for sharing those links. Interesting to see that Spotify is engaging on improvements.

<!-- gh-comment-id:3916236276 --> @tomballgithub commented on GitHub (Feb 17, 2026): Thanks for sharing those links. Interesting to see that Spotify is engaging on improvements.
Author
Owner

@misiektoja commented on GitHub (Feb 17, 2026):

Fingers crossed they will adjust it properly.

<!-- gh-comment-id:3916328166 --> @misiektoja commented on GitHub (Feb 17, 2026): Fingers crossed they will adjust it properly.
Sign in to join this conversation.
No labels
Stale
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify_monitor#23
No description provided.