I have a script that worked away for 1hr to 1hr 18mins getting data from a web server until I got the error 

NewConnectionError(': Failed to establish a new connection: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',)

I'm using sessions and with requests.Session() as s: to reduce some of the overhead in my requests but is there more I can do as I still have more content to get but also don't want to get a permanent block
So I decided to tackle the problem a different way and run the script multiple times but use if not os.path.isfile(FileNameToWrite): from import os.path to check if I had already processed the webpage and saved it to a file. If not I submitted the requests and eventually got all the data I needed. 
Incidentally I ran the same original code on a faster machine and it encountered the error sooner but having still processed the same number of files which incorporated roughly over 1000 requests
Is there a maximum period I should submit requests using python-requests to avoid blocking by the web server