Mail Queue
| From: | Christopher Kottler | Date: | Fri, 16 Nov 2012 16:13:07 +0000 |
| Subject: | Mail Queue | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-31668@lists.php.net to get a copy of this message | ||
Hi, I need help - I'm using a foreach loop to run through just over a thousand email addresses
on a distribution list and put them into the mail_queue table prior to sending via cron.
The loop executes fine and the onscreen output is completed as expected, however after about 150
inserts instead of returning the id as expected, the return value from using the put statement
changes and becomes the error message: "Mail Queue Error: Cannot connect to database" and
this comes back for each iteration of the loop to the end of the table. The first 150 emails are
committed to the db but the remainder aren't.
There is nothing obvious in any of the logs, all pear packages are up to date and the same sending
system works fine on a small test db of ten or so addresses both before and after the attempted
production run.
The emails are html email including two small images - I tried removing the images to see if the
memory load was the problem and this didn't make any difference - it still hung same as before.
The system is apache 2 running on virtual hosted ubuntu environment - the host says theres nothing
going wrong on the server but I am not sure how to check this. The db is mysql 5.x and its running
PHP Version 5.3.2-1ubuntu4.14.
I am sure there is something very obvious that I'm missing - anyone got any ideas of what I
should check next or how to fix it?
Kind regards
Chris