Is there a limit to no. of file handlers a script can use?
Posted: Thu May 17, 2007 6:12 pm
I sometimes have to do large mailouts (to subscribed addresses). I have a system where I build a mailout list from the wesbite administration tool, then send have the web-script call a background script to do the mailout. The background script reports back by writing an XML file which an ajax script from the browser accesses regularly.
The system works well, and has successfully sent throusands of emails for newsletters etc.
the most recent one I ran, something strange happenned. It was a very large list, and while the script did completely send all the emails (as confirmed by grepping the mail log) it stopped rewriting the XML file.
I have a custom error handler that should report any major PHP errors, but received nothing.
It had successfully rewritten the XML file about 2600 times when it stopped working.
After the last email is sent it should also sleep 15 seconds than delete the XML file (giving enough time for the Ajax script to get the last report), however it did not do this either.
I am wondering if there is an upper limit on how many times a PHP script can open a file handler? As I am closing the handler after each write.
Does anyone know about file handlers, and if they have a script limit? If so, I bet the guy who programmed the PHP file handler never thought anyone would ever use that limit!
PS - I do not endorse SPAM! this is for legitimate subscribed mailing lists only.
The system works well, and has successfully sent throusands of emails for newsletters etc.
the most recent one I ran, something strange happenned. It was a very large list, and while the script did completely send all the emails (as confirmed by grepping the mail log) it stopped rewriting the XML file.
I have a custom error handler that should report any major PHP errors, but received nothing.
It had successfully rewritten the XML file about 2600 times when it stopped working.
After the last email is sent it should also sleep 15 seconds than delete the XML file (giving enough time for the Ajax script to get the last report), however it did not do this either.
I am wondering if there is an upper limit on how many times a PHP script can open a file handler? As I am closing the handler after each write.
Does anyone know about file handlers, and if they have a script limit? If so, I bet the guy who programmed the PHP file handler never thought anyone would ever use that limit!
PS - I do not endorse SPAM! this is for legitimate subscribed mailing lists only.