johnnyt Posted Friday at 03:48 PM Posted Friday at 03:48 PM Hi @Jimbo.Automates, Whenever I restart IoX both my active Airthings-C plug-ins restart. For one of them it causes the plug-in to exceed the API limit for multiple update cycles that can last up to 45 mins when I look back to previous restarts. The plug-in that violates the API contract supports 9 devices with short poll of 330 (5 1/2 mins), which is sufficient in terms of not exceeding API limit (anything over 270 is enough) unless a plug-in restart occurs. The other active plug-in doesn't hit the API limit but it only has 4 devices and a 200 sec short poll. Unfortunately, for several reasons I need to restart IoX with some regularity, meaning a regular violation of the API contract with Airthings. Ideally could you put in a delay of short poll duration at plug-in restart to ensure there is no API limit violation? Desirable would also be no automatic restart when one is just calling for an IoX restart. That seems like a bug to me but I see other plug-ins restart too so maybe there's a reason for it that I'm not seeing? I guess it's not a big deal if one doesn't have an API call limitation but is more problematic when there is one. I will PM you my log (set to Info) for today. There was an automated restart just before 2AM and a manual one around 8:12 AM. Let me know if you need a lower level of debug logs. It's easy to change and replicate the issue. Here's a screenshot showing how PG3 has been running for a couple of weeks now while the plug-in has only been running for less than an hour (when I took the screenshot). Note that this has been happening for a while. i just haven't taken the time to report it until now. Thanks Quote
johnnyt Posted 17 hours ago Author Posted 17 hours ago Just to provide a visual, I have a program that notifies me by email when Airthings API Limit has been exceeded. Here's an example of what I get in my inbox when I restart IoX: Quote
Jimbo.Automates Posted 15 hours ago Posted 15 hours ago On startup the plugin must poll all to set initial values. I'll have to review the code but it should wait the defined time to poll again, but it might try more frequently after a failure.But really you shouldn't need to restart IoX every day.Sent from my Pixel 8 Pro using Tapatalk Quote
johnnyt Posted 14 hours ago Author Posted 14 hours ago Thanks for your reply. Does the plug-in actually need to restart just because one restarted IoX? Can't IoX just read/pull the values still there in the plug-in table (if it hadn't been restarted) to set the initial values in the IoX nodes? I was assuming a pull was possible because I see a "Query" and "Query All" buttons in AC as well as the option do it in programs for the Airthings nodes. If not / alternatively, can either a 'pull' function be added so a push is not needed (much cleaner), or something be added to stop/start the plug-in from a program in IoX? With the latter, one could write a program to stop the plug-in before doing an IoX restart (at least when it's a planned one), and another program that starts the plug-in 10 mins after IoX restarts. Or stop the plug-in when API Limit is exceeded, wait some period of time, then restart it. You're right that one should not have to Restart IoX regularly. Unfortunately, I have a number of issues that UDI either can't reproduce (so can't fix) or won't fix for a while because they have other higher priorities and very limited capacity. One of the unresolved problems is IoX spontaneously restarting, which can happen at highly inopportune time. These happen after IoX has been running for a while so I'm managing the issue by automating restarts to happen in middle of the night when no one notices. Right now weekly restarts at 2AM has avoided random restarts. It also means cleaner shutdowns instead of the hard crash of a random one. I might stretch that to 2 weeks but it's unfortunately become a necessary evil to avoid inopportune restarts, at least until either I and/or UDI can find/fix the root cause. I'm not hopeful that will happen soon, if at all. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.