Author Topic: Mailing stops every 300-400 mails  (Read 2877 times)

iburley

  • Posts: 4
    • View Profile
Mailing stops every 300-400 mails
« on: September 21, 2006, 01:51:24 am »
We have a 12,300 long list. We're using smtp for sending. The mailing always stops at an average of 250 batches, so we restart it as prompted and it gets there in the end but should we be having to do this?

We are using a managed dedicated server for our site and Listmail runs on the same server.

In our latest mailing, a bounced message stopped the send and we were unable to resume, even though we were told messages were in the queue.

Any help much appreciated.

Ian

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Mailing stops every 300-400 mails
« Reply #1 on: September 21, 2006, 04:34:48 am »
Hi Ian,

I'd like to help you get this sorted.

Are you on the latest version available from the member area?  It's possible some SMTP bugs have been fixed since you last updated.

Your host could have a limit on the # of messages sent per SMTP connection.  Have you tried reducing ListMail's "Reconnect every X emails" SMTP setting to below 250 and does it help?

Does the script appear to be stopping after a certain amount of time rather than a certain number of emails?  It's possible your server has a strict 30 second time limit on PHP scripts.  ListMail's tries to avoid this but sometimes it's not possible unless PHP "Safe Mode" is turned off for your domain.

What server management software do you use?  Is it one of Plesk, cPanel or Ensim, perhaps?

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

iburley

  • Posts: 4
    • View Profile
Mailing stops every 300-400 mails
« Reply #2 on: September 21, 2006, 08:10:11 am »
Hi Dean, I contacted our hosting company (the server is a dedicated one, but maintained by them for us) and they confirmed that there was a limit of 99 messages per batch, so I reduced the number to 50 before reconnecting to be safe and a short text email we sent to our mailing list executed perfectly. The first time it has ever run from start to finish without intervention :)

But after that we sent our newsletter, 20K of html and also a text version for those who opted for that. This time it has been very slow and timing out again.

I'm not sure we have access to the php modes or server management software.

I upgraded to the latest version yesterday. The rearrange layout threw us a bit, but we've acclimatised now :D

Ian

gwinmill

  • Posts: 5
    • View Profile
Mailing stops every 300-400 mails
« Reply #3 on: September 21, 2006, 03:34:09 pm »
I am encountering the same problem. I have a list of25,000 and I keep having to re-start the mailing about every 2,000 emails. I have only recently purchased ListMail so I should have the latest edition.
Graham

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Mailing stops every 300-400 mails
« Reply #4 on: September 22, 2006, 03:07:48 am »
iburley,
Quote
Hi Dean, I contacted our hosting company (the server is a dedicated one, but maintained by them for us) and they confirmed that there was a limit of 99 messages per batch, so I reduced the number to 50 before reconnecting to be safe and a short text email we sent to our mailing list executed perfectly. The first time it has ever run from start to finish without intervention

I recommend raising the limit to 98 to reduce the # of reconnections.
Quote
But after that we sent our newsletter, 20K of html and also a text version for those who opted for that. This time it has been very slow and timing out again.

Did your first mailing mentioned above take less than the amount of time it takes for the larger mailing to time out?  Try watching the Windows clock to see exactly how long it takes to timeout and see if it's consistently the same or not.  If it's always the same I suspect that you need to have php safe mode disabled for your domain to allow for 'unlimited' execution time, as ListMail tries to set.
Quote
I'm not sure we have access to the php modes or server management software.

Regardless of setup, sharing, etc. your host should be able to do this for you on a per-domain basis fairly easily.

Graham,
Quote
I am encountering the same problem. I have a list of25,000 and I keep having to re-start the mailing about every 2,000 emails. I have only recently purchased ListMail so I should have the latest edition.

I can recommend the same answer:

Your host could have a limit on the # of messages sent per SMTP connection. Have you tried reducing ListMail's "Reconnect every X emails" SMTP setting to below 2000 and does it help?

Does the script appear to be stopping after a certain amount of time rather than a certain number of emails? It's possible your server has a strict 30 second time limit on PHP scripts. ListMail's tries to avoid this but sometimes it's not possible unless PHP "Safe Mode" is turned off for your domain.
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

Alex1

  • Posts: 4
    • View Profile
Same Problem in Safe Mode
« Reply #5 on: September 27, 2006, 12:42:27 pm »
I have the same problem, and I implemented all suggestions above.

My host allows 99 messages, and I found the optimal number to reconnect was 50. I can send a maximum of 300 messages that way before mailing stops.

My host is has the php safe_mode=off by default.

What else can I try. I need to send over 5k emails.

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Mailing stops every 300-400 mails
« Reply #6 on: September 27, 2006, 01:20:15 pm »
Does the mailing simply "stop" (ie page timeout) or is there a ListMail error message?

You can test whether your host has a time limit or not by creating a .php file containing the following:
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.";?>

Upload it to your web site and browse to it.  If all tests run to completion the timeout issue may not be the problem.

If this isn't timeout-related (ListMail reports an error - the page does not simply 'stall' during loading) you can determine whether this might be caused by an SMTP error by enabling "Always write SMTP log" on the ListMail Config page.  This way we can check the log to see if there is a consistent series of events before the mailing stops.

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

Alex1

  • Posts: 4
    • View Profile
Script times-out
« Reply #7 on: September 27, 2006, 07:14:13 pm »
Thank you for the quick responce. I ran the script and this is what I get:

Testing 1s...
Process started at 22:10:51 and 0.89601900 nanoseconds.
Process completed at 22:10:52 and 0.93215500 nanoseconds.

Testing 5s...
Process started at 22:10:52 and 0.93226400 nanoseconds.
Process completed at 22:10:57 and 0.93235300 nanoseconds.

Testing 35s...
Process started at 22:10:57 and 0.93239400 nanoseconds.

Looks like the last test failed.

What can I do to fix the issue?

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Mailing stops every 300-400 mails
« Reply #8 on: September 28, 2006, 12:41:09 am »
Your host does not seem to allow ListMail to set the timeout to unlimited with the PHP line:
Code: [Select]
ini_set('max_execution_time',0);
Another way of doing it is:
Code: [Select]
set_time_limit(0);
Here's the PHP documentation:
http://php.net/manual/en/function.set-time-limit.php

Quote
set_time_limit() has no effect when PHP is running in safe mode. There is no workaround other than turning off safe mode or changing the time limit in the php.ini.

Are you sure safe mode is off?  You will have to ask your host to remove the time limit/inability to set this system variable.

In my experience setting PHP safe mode off does the trick.  Unfortunately I don't have any other suggestions for you.  I recommend pointing your host to the time-testing script to see if they can get it working.  If your host manages to figure it out and sends you details please let me know as it could help other ListMail owners in the future.

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

Alex1

  • Posts: 4
    • View Profile
Mailing stops every 300-400 mails
« Reply #9 on: September 28, 2006, 12:15:50 pm »
I tried using set_time_limit(0); and I still get the same result.

Here is all the php info: http://demo.reioo.com/php-info.php

It shows that safe_mode is off.

Do you see any settings that may be causing this?

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Mailing stops every 300-400 mails
« Reply #10 on: September 28, 2006, 03:55:23 pm »
This should (normally) be the only setting that causes it.

I have scoured the net and was able to find one possible solution:
Quote
is the php.ini setting of open_basedir set ??

This does not appear to be set and it may need to be set to your public web folder.  Mine for listmailpro.com is set as follows, which also allows access to the /tmp folder, useful to some scripts:
Quote
/var/www/html/listmailpro.com/public_html:/tmp

It's set like this in httpd.conf for your domain:
Code: [Select]
php_admin_value open_basedir "/var/www/html/listmailpro.com/public_html:/tmp"
Your host will need to investigate.  You might advise them to use the script to test it.

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