API requests stop firing after a couple hours for custom module
Just got my mirror up and running, I am still working on my custom MMM-CTA module, a module for Chicago public transit. My issue is after a couple of hours of flawless running, the module stops sending API requests. I have a scheduleUpdate() function handling the repeating requests.
You can view my code here: https://github.com/NateDee/MMM-CTA
Thanks for any help!
I have a similar issue with forecast-io. Sometimes it updates for days, sometimes it stops updating after an hour or so. I wish I could help fix your problem, but the only thing I did was add a small piece of text that shows when it was last updated so I can restart the mirror.
Mochman are you using a setTimeout() or setInterval() function to schedule your requests? I was using a setTimeout() and just switched over to setInterval(), I will let you know how it goes. Mine pretty much always cuts out within a few hours.
I’ll update you if that does the trick for me.
First thing I’d try is logging HTTP request and response into a file to collect some more details to reason on. Don’t forget to log timestamps and all headers.
Having said that, I think @NateDee’s explanation makes a lot of sense to me.
@NateDee I tried the same thing. The weird thing is that all the other modules update normally, just the one weather one. Nay luck with your issue?
@mochman after 10 hours it’s still running and updating! I think that did the trick! It would always freeze during the overnight hours, I’m guessing I was having some hiccup for when no buses and trains were running. Do you have a thread open for your issue?
@pinsdorf I had logs running, including logging json respones, but I never saw any errors the requests would just stop.
You could also do a console.log to see if you’re getting regular outputs after your request…