Closed kevinabrandon closed 6 years ago
While searching through log messages I found that on the last tweet before the screenshots went away there was an exception in screenshot(): <class 'http.client.BadStatusLine'>
. After that one there was an exception in clickOnAirplane(): <class 'urllib.error.URLError'>
. I'm currently catching these errors specifically and will try to reload the browser when they're caught. I'm running that now and waiting to see if that works. If it does then I'll go ahead and push those changes and close this issue.
I think I start getting these messages when the raspberry pi runs out of memory. I've been looking at my performance graphs and I can see there is some kind of memory leak going out of control... still investigating.
Definitely a memory leak. I'm having success by periodically quitting and restarting the browser once an hour: You can see the memory usage creeping up, and then on the hour it drops down, creating the sawtooth effect. I'll be pushing this code very soon.
Now that the general reliability of the script has been improved, I've found that eventually the internal browser will fail and the screenshots will stop working. Currently there's nothing inside the script to attempt to reload the browser if it ever goes away.