Hi DW,
How would this be any different than what I do? It's not, I just go into lm_sendq and delete the first record, that's it, the mailing continues on from there UNTIL it hits another bad email address - I don't see where this is a problem?
I may be mistaken but without an auto-incrementing ID we can't be sure of the order of the returned rows during sending, resuming, or with a manual 'Browse' as you do.
I'm not sure where your coming from but let me tell you a little about my background, I've got a Bachelor's degree in Computer Science with the concentration in Database Systems, that's the truth, if you want I can scan in my Diploma it's hanging on the wall behind me!
There is NO reason that when you do a MYSQL query that you can't consistently pull the EXACT Same record I'm looking at using PhpMyAdmin, I browse lm_sendq and grab the first record, THAT is the one EVERY TIME that is causing the stalling - how do I know that - because EVERY TIME when I delete that record the mailing resumes as normal - the stalling stops, obviously using PHPMyAdmin the query is:
SELECT * FROM `lm_sendq` WHERE 1
, if you do the exact same query (or similar) in LMP - YOU ARE GOING TO GET THE EXACT SAME RECORD!
I understand that you seem to be able to grab the top row consistently, but I don't think it's guaranteed.
You said yourself there is NO indexing, I CAN TELL YOU 100% OF THE TIME - IT IS GUARANTEED.... Why the $%#$% $# do you think it is not guaranteed - if you're curious do the MYSQL query yourself - EVERY TIME it will pull the same record.... do you want me to scan in my diploma?
This is done because an index takes time to update when inserting or deleting rows to maintain quick sorted results, so it would slow down the queuing and sending processes.
I KNOW that, you've got no indexing which is fine, and is faster, BUT that doesn't change the order of the tables - unless I'm completely nuts (which I doubt), YOU ARE GOING TO GET THE EXACT SAME RECORD EVERY TIME - anyone in their right mind would never write a DBMS that would pull different records every time a query is done on an unindexed table, that's pure insanity....
If you want a custom script to do a general select and delete of the top row (if the # of entries hasn't changed in X time) I'd still be willing to program it for you.
This is what I've asked for, for 2-3 weeks now.... of course that's what I want - NOT ONLY THAT, it is THE BEST WAY to solve this problem - and NOT by throwing in 12 second SMTP delays - you've slowed my mailing queue sending tremendously going out SMTP, the solution you have is NOT going to work - I'm about to do a test mailing - I'm going to turn ON SMTP logging for you, and then I'll try to do the same test without the SMTP delay and show you....
Still, it would be better if we could check the logs and/or troubleshoot your server to figure out exactly why the system is hanging up...
I had a look (at Ridera code on PHP.net) and it appears to be written to manually time the connection with blocking set to false. Blocking off means the read command doesn't wait for data from the server.
ListMail *could* do it this way, but I wonder if it would be more processor-intensive. Look at all the function calls, variable comparisons, etc. required.
Then PLEASE do it that way, or at least try.... OR, if you do not want to get into it, just provide the function that I mentioned above - and put it in resume.php - watch lm_sendq for xxx seconds, if the same record is there, obviously it's stalled, delete the record (AFTER YOU RECORD the email address in a log for later viewing) and that's it...
To ME, it seems the later choice is the better one for now, it let us all get back to work - I can NOT sit around here and wait, for now I'm stripping OUT your delayed SMTP code, as I said it's slowed my mailings down by a factor of 2 to 3 times and I can NOT wait around for the mailings that long.
I have found it required to add
"stream_set_blocking($fp, FALSE )"
This could be applicable here and would mean ridera's solution is the only solution. I will have to investigate this further possibly by inducing delays etc. to simulate what you experience on your server. It will be useful to see what's happening in your SMTP log. While it won't tell us how 'slow' the mailing goes, it will at least rule out the possibility of the majority of delays coming from a very large number of bad addresses / reconnects.
Regards
Like I said, I'll run a test this afternoon and post the log - PLEASE do something about this, as it's killing my click-through rate and deliverability, the mailings are running VERY SLOW, and when they run, I'm not sure all the mail is being delivered - I'm down to about 10% of what I should be with a mailing?