Author Topic: Sending stalls with an error that isn't...  (Read 2762 times)

Panther

  • Posts: 10
    • View Profile
Sending stalls with an error that isn't...
« on: July 18, 2006, 01:00:59 am »
Hi all

I keep running into a problem where mails will start sending fine, then after a completely random amount of time it'll stop and display this error:

Quote

Sending error. Check your mail settings.

Server said:
RCPT TO: <valid@emailaddress.com>
250 2.1.5 ... Recipient ok
354 Enter mail, end with "." on a line by itself


and then I'll have to wait a whole minute before being able to resume the sending. I can't keep doing this as my list is far too big to be babysitting.

Any ideas?

Cheers



PS I'm trying to get auto-resume set up but I'm having a few problems getting the cron tasks to actually run.

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Sending stalls with an error that isn't...
« Reply #1 on: July 18, 2006, 06:02:33 am »
Hi,

Quote
I can't keep doing this as my list is far too big to be babysitting.


You've got it, auto-resume (resume.php) is the way to go, it solves that problem, so you should work on getting your CRON jobs running.  You can find help on setting up/using cron online just type in CRON into any search engine.
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

Panther

  • Posts: 10
    • View Profile
Sending stalls with an error that isn't...
« Reply #2 on: July 18, 2006, 06:30:46 am »
Thanks for that, tho I would be interested in the cause of the non-error.

As to cron, I've got the job entered into the crontab and its still there if i run 'crontab -l' but it doesn't actually fire. crond is listed by 'ps -ef | grep crond' but thats as far as my knowledge goes unfortunately...

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Sending stalls with an error that isn't...
« Reply #3 on: July 18, 2006, 01:48:39 pm »
In an effort to help all users of ListMail I recommend updating to the latest release (v1.87).  If you continue to have troubles I can then troubleshoot and improve things for everyone.  Enable the new option "Always write SMTP log" on the Config page and you will have all the evidence that should be required to troubleshoot this issue.

It sounds like you have access to a dedicated server.  Is the "/usr/bin/wget" system utility used by ListMail's cron task available?

Type:
Code: [Select]
which wget
and it should show you the path to wget if it exists.   If wget resides in /usr/local/bin instead of /usr/bin the cron task would need to be updated, or a symbolic link could be made:
Code: [Select]
cd /usr/bin
ln -s /usr/local/bin/wget

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

Panther

  • Posts: 10
    • View Profile
Sending stalls with an error that isn't...
« Reply #4 on: July 19, 2006, 02:59:12 am »
I've just upgraded to 1.87 (had some fun with forgetting to logout before uploading the new files, maybe that could be checked for by the script in future?) and ticked the global SMTP log option and resumed a mailout that had previously stalled.

It stalled again after approx 150 emails (this time) and unfortunately the log file is now zero length. Is there any difference between this new log method and the SMTP log you get from ticking the box on the 'send a message' screen?

I have this log file from when this mailout original stalled:

Quote

> EHLO localhost
250-vi-ads-1602.ads.vi.net Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH LOGIN PLAIN
250-DELIVERBY
250 HELP
LM: SMTP Pipelining Detected
> NOOP
250 2.0.0 OK
> MAIL FROM: <bounce@xxxx>
> RCPT TO: <xxx>
250 2.1.0 <bounce@xxxx>... Sender ok
250 2.1.5 <xxx>... Recipient ok
> DATA
354 Enter mail, end with "." on a line by itself
> SENT DATA


etc etc until the end of the file (when it stalled) which looks like this:

Quote

> SENT DATA
250 2.0.0 k6HDRmSu019712 Message accepted for delivery
> MAIL FROM: <bounce@xxxx>
> RCPT TO: <xxx>
250 2.1.0 <bounce@xxxx>... Sender ok
250 2.1.5 <xxx>... Recipient ok
> DATA
354 Enter mail, end with "." on a line by itself
> SENT DATA


and thats it, no error, just nothing more logged.


As to the cron issue, wget is where it should be. It looks like there is a larger problem as I've created a small php script that sends me an email every time its visited and set up an identical job to the auto-resume one which calls it every 5 minutes. I haven't received any emails so the job isn't firing.

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Sending stalls with an error that isn't...
« Reply #5 on: July 19, 2006, 07:48:17 am »
Hi,

Quote
and thats it, no error, just nothing more logged.


Sounds like a bad email address in your list, this has been discussed in the past, in fact I asked that the resume.php automatically delete the top record in the lm_sendq table at this point - because it's probably what is causing it...

Open up your PhpMyAdmin for your MySQL database, go the the lm_sendq table - find the top record and look up the user id (uid field), then go to your lm_users table and search for the user id (id field), just for clarity your going to search for id=(what you looked up as the uid field in the lm_sendq table).  

Take a look at the email address for that user (email field), I'll bet it's bad, or the domain is unresponsive or down.  Delete the top record from the lm_sendq (the one you just looked when you grabbed the uid field) and then run resume.php manually from the command line - sounds like you need to test it running properly anyway...  that should resume you from where you are...

Then you need to get your CRON issues straightened out, here's the call I use:
Code: [Select]
*/2 * * * * /usr/bin/wget -O /dev/null -T 0 http://mydomain.com/mail/resume.php?pw=mypass 1> /dev/null 2> /dev/null


Note that I run it every 2 minutes, since I found that even every 5 minutes was severely slowing down my sending...

Good luck, let us know what you find...
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

mike2

  • Posts: 193
    • View Profile
Sending stalls with an error that isn't...
« Reply #6 on: July 19, 2006, 12:39:08 pm »
Quote from: "webshaman"
Hi,

Quote
and thats it, no error, just nothing more logged.


Sounds like a bad email address in your list, this has been discussed in the past, in fact I asked that the resume.php automatically delete the top record in the lm_sendq table at this point - because it's probably what is causing it...


Yea but that would be the wrong thing to do for everyone, because this is simply an error with your SMTP program...

I say fix your SMTP program, but if you can't do that, I guess make it an option for people to have auto resume delete the first record, because I use auto resume and I don't want it auto deleting the first record when it has to kick in for me...

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Sending stalls with an error that isn't...
« Reply #7 on: July 19, 2006, 09:43:30 pm »
Quote
It stalled again after approx 150 emails (this time) and unfortunately the log file is now zero length. Is there any difference between this new log method and the SMTP log you get from ticking the box on the 'send a message' screen?

No, there is no difference.  Is it always zero-length?  I'm not sure what's going on here - maybe there's a problem with the global SMTP log feature...  you might also enable it permanently by changing the following:
Code: [Select]
// debug, shows SMTP messages
 // $smtp_debug = '1';

to
Code: [Select]
// debug, shows SMTP messages
 $smtp_debug = '1';

in admin.php

Quote
As to the cron issue, wget is where it should be. It looks like there is a larger problem as I've created a small php script that sends me an email every time its visited and set up an identical job to the auto-resume one which calls it every 5 minutes. I haven't received any emails so the job isn't firing.

If you have access, you can enable email output from cron by adding the following line to your crontab:
Code: [Select]
MAILTO=you@example.com
This might also be able to be set up in your web host control panel.  You would need to remove the "1> /dev/null 2> /dev/null" lines from your cron tasks for there to be any output to be emailed.

The first record should no longer need to be deleted with the recent addition of the 9 second SMTP timeout.  You might try decreasing this to 4 seconds by setting the following line in config.php:
Code: [Select]
$smtp_timeout = 4;
I also think the stalling could be because the SMTP server stops responding without warning and/or there is a hard PHP script execution time limit.

Copy and paste the following code into a new .php file, upload, and browse to it on your server.  If it runs to completion the problem is most likely not due to a PHP script time limit.
Code: [Select]
<?phpini_set('max_execution_time',0);   function timeWait($microtime)   {       $timeLimit = $microtime + array_sum(explode(" ",microtime()));       while(array_sum(explode(" ",microtime())) < $timeLimit)       {/*nothing*/}       return(true);   }   echo "Testing 1s...<br>Process started at " . date("H:i:s") . " and " . current(explode(" ",microtime())) . " nanoseconds.<br>";flush();   timeWait(1);   echo "Process completed at " . date("H:i:s") . " and " . current(explode(" ",microtime())) . " nanoseconds.<br><br>";   echo "Testing 5s...<br>Process started at " . date("H:i:s") . " and " . current(explode(" ",microtime())) . " nanoseconds.<br>";flush();   timeWait(5);   echo "Process completed at " . date("H:i:s") . " and " . current(explode(" ",microtime())) . " nanoseconds.<br><br>";   echo "Testing 35s...<br>Process started at " . date("H:i:s") . " and " . current(explode(" ",microtime())) . " nanoseconds.<br>";flush();   timeWait(35);   echo "Process completed at " . date("H:i:s") . " and " . current(explode(" ",microtime())) . " nanoseconds.";?>



Also try setting your "Reconnect every X emails" setting lower, to something like 120.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

Panther

  • Posts: 10
    • View Profile
Sending stalls with an error that isn't...
« Reply #8 on: July 20, 2006, 03:59:20 am »
First off, thanks guys for all your help with this, much appreciated.

The time check script ran to completion so doesn't look like thats a problem.

I've added the new variables to the config.php file (strangely they didn't magically appear when I upgraded :)) but I think the biggest advance so far is managing to fix the auto-resume.

Turns out that the the nameservers supplied by my host weren't resolving any names so the server wasn't able to find the script to run it. I've borrowed someone elses's namerservers for the time being and all is working well.

I'm running a mailout this afternoon so we'll see how it runs, and if things get logged. I've got loads of zero-length logs from last night as it finished off that other run now the auto-resume is working, seemed to fail every 2 to 10 mins according to the file creation times.

I'll keep you posted on my progress but I think you guys have cracked it now. Cheers!

Panther

  • Posts: 10
    • View Profile
Sending stalls with an error that isn't...
« Reply #9 on: July 21, 2006, 07:47:43 am »
Hi all,

Ran in another problem last night. When I ran yesterday's list it seemed to be progressing through the queue but not updating the emails per sec/hour despite updating the total number of emails sent.

According to the logs the emails went but I'm wondering what I've done to break that, and if its causing other problems??

Thanks

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Sending stalls with an error that isn't...
« Reply #10 on: July 23, 2006, 01:40:34 am »
Are you using a browser other than Firefox or IE?  Are you on a Mac?

If you like, submit a bug report and I'll try a few test mailings.  For best results please mention the problem again and/or provide a link to this forum thread along with your request!

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Sending stalls with an error that isn't...
« Reply #11 on: August 24, 2006, 10:44:36 pm »
How have things been?

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

Panther

  • Posts: 10
    • View Profile
Sending stalls with an error that isn't...
« Reply #12 on: August 25, 2006, 02:06:24 am »
Hi, thanks for checking up, apologies for not replying before.

I use Opera on a WinXP machine, and have not had problems in the past with your software, however the changes to version 9 of Opera seemed a bit dodgy so don't rule it out completely.

We have recently suspended our mailouts for other reasons so don't have an opportunity to test things at the moment.

Thanks again for all the help

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Sending stalls with an error that isn't...
« Reply #13 on: August 25, 2006, 08:49:48 am »
Hi,

Quote
I use Opera on a WinXP machine, and have not had problems in the past with your software, however the changes to version 9 of Opera seemed a bit dodgy so


Just wondering about this, I'm planning a move to Opera, are you saying you get errors running LMP under Opera, like what?

I'm curious if it's worth moving over to the platform if it doesn't work exactly (preferably somewhat) like IE?
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)

Panther

  • Posts: 10
    • View Profile
Sending stalls with an error that isn't...
« Reply #14 on: August 25, 2006, 09:06:11 am »
You'll have to read the whole post, and you'll see I've had a lot of other rather specific problems so I definitely wouldn't judge Opera or Listmail based on this :)

Opera is great in normal life, the most secure browser I know of (better than firefox if you read around)

So far I've sent over half a million emails using Listmail with Opera, its cool