Regularly Querying HTTPS API causes "shutdown"

makeplants

Member
Joined
Feb 27, 2025
Messages
5
I'm building a simple RPi powered LED display that displays the album art of the currently playing song. I've found that when I query the WiiM API more frequently than every ~5 seconds, the WiiM hangs itself up. I'm not able to access it in the app and have to unplug/plug it back in to restart (which fixes things). Although a 5 second polling rate is workable, it causes a noticeable delay between when the song changes and when the album art is updated.

Also, if I'd like to add extra info to the display (i.e. position in the song) I'd want to ping the API at least once a second.
This only happens when the API has been queried at a higher rate for more than 30 minutes - if I'm not querying the API the WiiM runs great!

Do folks know if this is an inherent limitation of the WiiM Mini/API, or if there could be something else going on?
 
It is an issue with the wiim mini. Four months ago support said they will send me a firmware to address this, but it hasn't happened yet. I encourage you to open a support ticket. If they hear from more people it may get more attention.
 
It is an issue with the wiim mini. Four months ago support said they will send me a firmware to address this, but it hasn't happened yet. I encourage you to open a support ticket. If they hear from more people it may get more attention.
Unfortunate, but thanks for the quick reply. I filed a support ticket & will update you with the response.
 
Also, if I'd like to add extra info to the display (i.e. position in the song) I'd want to ping the API at least once a second.
This only happens when the API has been queried at a higher rate for more than 30 minutes - if I'm not querying the API the WiiM runs great!
Couldn't you fake it by interpolating the expected position? A 12 Hz signal (every 5s) vs a 60 Hz signal (every 1s).

The WiiM Mini uses a dual-core ARM Cortex-A7 CPU, complemented by 128 MB of DRAM and 128 MB of flash memory from what I can tell. It would be clocked somewhere in the middle of 800 MHz to 1.2 GHz. It seems adequate but they haven't optimized for frequent API queries.

 
Couldn't you fake it by interpolating the expected position? A 12 Hz signal (every 5s) vs a 60 Hz signal (every 1s).
Yeah, faking it would work. It's more that I want the album art to update closer to real time. What I have right now is totally workable (I'm able to query every 2s) but there's a noticeable delay between the song changing and the album art changing.

@cc_rider every ~1s is great! That still causes the softlock for me unfortunately.
 
General update! @dustin this is probably of most interest to you.
I heard back from support, here's what they said:
This is a known issue. The Boa server used by the Mini has a memory leak. We plan to update to Light HTTPD in the future.
Hopefully that update happens soon, but for now I've been able to update every 2s (slowing down to ~15s when the wiim is in sleep mode) with no issues. My worry is that with this memory leak querying less frequently is just delaying the inevitable, but I followed up with support to ask so I'll let y'all know what they say in response.
 
General update! @dustin this is probably of most interest to you.
I heard back from support, here's what they said:

Hopefully that update happens soon, but for now I've been able to update every 2s (slowing down to ~15s when the wiim is in sleep mode) with no issues. My worry is that with this memory leak querying less frequently is just delaying the inevitable, but I followed up with support to ask so I'll let y'all know what they say in response.
That's welcome news. In my case, as far as I can tell, they have the issue when polled every 10 seconds. Sometimes it would take a day or two to trigger the issue, sometimes only a few hours.
 
That's welcome news. In my case, as far as I can tell, they have the issue when polled every 10 seconds. Sometimes it would take a day or two to trigger the issue, sometimes only a few hours.
20+ year old software is crazy lol.
Having run this on/off for the past month I've found that the quickest I can do is every ~5s, and the issue is pretty reliably triggered ~daily. Right now I'm modifying my client to count the number of pings and seeing if there's any correlation (going to do this experiment over the course of a week or so and get averages) - if there's any regularity then it could be possible to automatically reboot (also via the API) before the memory leak gets out of hand. Which would still be a very ugly workaround, but a workaround nonetheless. Hopefully they actually update their server soon!
 
20+ year old software is crazy lol.
Having run this on/off for the past month I've found that the quickest I can do is every ~5s, and the issue is pretty reliably triggered ~daily. Right now I'm modifying my client to count the number of pings and seeing if there's any correlation (going to do this experiment over the course of a week or so and get averages) - if there's any regularity then it could be possible to automatically reboot (also via the API) before the memory leak gets out of hand. Which would still be a very ugly workaround, but a workaround nonetheless. Hopefully they actually update their server soon!
Is it cumulative requests or constrained by x requests / y period of time? I thought that WiiM was planning to swap boa out at some point, so the alternative is to put your project off for a bit until they switcheroo.
 
Back
Top