tam94131
Posts: 22
Joined: Thu Aug 08, 2019 11:00 pm

Requests GET throws up after script running awhile

Fri Feb 14, 2020 3:08 pm

Hi.

My project is a RaspPi 3 B+ with official touchscreen running a python script plus a chromium webpage showing 24x7 acting as a touchscreen controller appliance. I have a bunch of them and this seems to be much more common on WiFi connected RaspPis vs. Ethernet-connected.

Problem is that after it's been running for several days, outbound requests GET calls throw an exception:

HTTPConnectionPool(host='10.x.x.x', port=xxxx): Max retries exceeded with url: /JSON?request=xxxxxdevicebyvalue&ref=353&value=532 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x74a9f210>: Failed to establish a new connection: [Errno 113] No route to host',))

(I've x'd out sensitive stuff.)

Basically, it can no longer make outbound calls unless it's rebooted. I don't think it's my script (pretty straightforward although it is multi-threaded, etc). WiFI has always been iffy with the RaspPis (although I really only have used Rasp3's) so I don't know if the routing table is getting messed up, it's the library, or what.

Any pointers would be helpful. Since this needs to work, the only alternative is auto-rebooting it once or twice a day. Ugly.

Thanks!

Return to “Python”