Skip to content

Sending seems to "pause" every 20230 messages..

DanDan
edited February 2013 in Troubleshooting

I am sending a mailing and it seemed to hang at 20230, so I clicked resume. It is now at 40460 and appears to be hanging again.

Any thoughts?

Thanks,
Dan

Comments

  • DanDan
    edited February 2013

    the error log shows this right before the hang:

    PHP Fatal error: Cannot redeclare class EmailAddressValidator in /sendy/includes/helpers/EmailAddressValidator.php on line 20

  • DanDan
    edited February 2013

    It appears the issue is that the EmailAddressValidator class is being declared twice...

    So I wrapped the class in the following code:

    if (!defined("EmailAddressValidator_Declared"))
    {
    define("EmailAddressValidator_Declared", "EmailAddressValidator_Declared");
    
        class EmailAddressValidator {
            /*...*/
        }
    }
    

    So far this seems to be working. This is just my temporary fix to the issue...

    Thanks,
    Dan

  • Hi @Dan,

    The EmailAddressValidator class is not used when sending though. So it's not the cause of the issue.

    The reason why sending stopped is most probably due to your server timing out. If you're using a cron job to send, it will automatically resume, so I don't encourage clicking the 'Resume' button manually. Just let cron job execute the sending script to check if server timed out and resume automatically.

    For the 'Cannot redeclare class' error, I'm wondering if you've updated to version 1.1.5.1 I released right after releasing 1.1.5?

    Thanks.

    Ben

  • I have updated to version 1.1.5.1.

    and the newsletter froze at least 10 times through out the night. and would stay that way for literally hours, until I would hit resume.

    It took over 20 hours to send 200k emails.

    any thoughts why this could be happening. It did not appear occur in the old version of sendy but I may be wrong.

  • I was thinking, could I use this to set the time out to like 4 minutes?

    set_time_limit(4*60);
    
  • When going through error logs I found the following:

    [26-Feb-2013 22:18:27] PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted (tried to allocate 49456 bytes) in /sendy/includes/helpers/class.amazonses.php on line 194
    
  • Hi @Dan,

    Your server's memory is not high enough to support your volume of emails as you can see that your server's memory keeps getting exhausted. You need to change to a higher powered server to support your volume and avoid these timeouts.

    Thanks.

    Ben

  • When this error occurs is sendy supposed to recover or will that be a cause of the need to hit resume?

  • DanDan
    edited February 2013

    Do you have a recommended memory limit? I was going to set it to 128mb.

  • BenBen
    edited February 2013

    Hi @Dan,

    There's no recommended memory limit. It all depends on your volume. Your volume is huge so a high memory_limit is needed. On the smallest server on Amazon EC2, it has 613MB of memory. I usually set PHP's memory_limit to 600MB as I have no other websites or applications running on that server.

    If you're not using EC2, even the ability to allocate a memory_limit depends on what hosting company you're using, what tier you're on (eg. shared or VPS) and what server specifications (CPU/memory) the hosting company's servers are using.

    You have a very high volume, I'm not sure what server you're using but I hope it's at least a VPS where you have more flexibility in adjusting your PHP's allocated memory_limit.

    Hope this helps.

    Ben

  • It is a dedicated server, and I do have the ability to adjust the memory limit. When the memory causes the script to fail, does sendy automatically resume or do I need to manually do this?

  • Yes, Sendy will auto resume.

This discussion has been closed.