We have been trying to track down a very elusive bug on our production server for almost a month.
We have an admin interface to send e-mails to our customers (about 20,000).
Our system pulls the relevant records from the DB, and then mails them using a PEAR library (we were using PHP mail() previously).
At the beginning of the script, we call:
set_time_limit(0);
ignore_user_abort(true);
However, after a random amount of time, normally between 2-5 minutes, the script just dies having sent around 1000 e-mails (+/- 500). No errors, it just stops running. I've been watching the process ID of the script, but it's the apache process, and that keeps on running, so I have no clue what's going on.
Here are the PHP configuration options for production:
Configure Command => './configure' '--with-apxs=/usr/local/apache-1.3.33/bin/apxs' '--with-mysql=/usr/local/mysql' '--enable-mbstring' '--enable-force-cgi-redirect' '--with-zlib' '--with-gettext' '--with-gdbm' '--with-gd' '--with-jpeg' '--with-curl' '--with-ssl' '--with-openssl' '--enable-inline-optimization'
'--disable-debug' '--with-xml' '--enable-module=ssl' '--enable-module=most' '--enable-shared=max'
Does anyone have any ideas? I would be eternally grateful...
This is a dual Xeon with 2 GB of RAM and SCSI drives, so it's a fast machine...
It's really hard to test this because it only seems to happen in this mailing script, and we can't just send bogus e-mails to test it. It dies whether we use PHP mail() or our PEAR library.
Thanks,
Alex