Reputation: 1145
I have set up a database and php file running on my host and I run a python code that uploads a json file every 5 minutes using the Requests module. After about 6-8 hours, the app crashes and produces this error:
Max retries exceeded with url: /rpitest2.php (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)
What could be the reason for this?
Upvotes: 1
Views: 2887
Reputation: 4412
This could happen with badly formed URLs or a DNS failure.
Can you log the full URL that is being accessed? Seems like it is getting corrupted over time.
Upvotes: 1