I'm using WAMP on my Windows 7 machine, so I'm not sure if this error is coming from my server or else the server that my script is executing the POST against. There's no revealing errors in either the Apache error logs, the PHP error logs, or even the Windows system logs but the consistent thing that I am noticing is that the process ends almost exactly after 2 hours and 15 minutes.The connection was reset
The connection to the server was reset while the page was loading.
Before I do anything in the script, I use PHP to change both the memory_limit and time_limit ini values to ensure no resource problems arise and I also have error_reporting set to -1 (to ensure that I see *all* errors). I've not seen a single run time error to mention, and the memory that PHP needs is always around 95x.xx KB before bombing out. (So I'm not sure if this is an issue with the resources I've allocated my WAMP server or else a security facility that terminates the connection from the server my script is extracting e-mails from due to the consistent duration I keep seeing of 2 hours and 15 or so minutes of processing.)
I'm curious: is there any way to trap these "Connection was reset" errors? I'm using the php-imap library found here: https://github.com/barbushin/php-imap. So far, it's done exactly what I've needed but I'm not sure if this is causing any issues or not.
If I could just figure out how to trap this outcome, I could add some logic that could reconnect to the e-mail server and continue extracting e-mails from where it left off... Otherwise, I'll have to do something that allows the user to simply restart the process, first checking for the last e-mail ID that was extracted and then continue extracting from there (which I don't want to have to do--I'd like to make it work continuously without needing manual intervention, etc.)
Any insight into this would be appreciated.