Support » Plugin: MailPoet Newsletters (Previous) » Time-out when sending newsletter

  • Resolved jdy68

    (@jdy68)


    Hi,

    I’m sending a lot of 30 mails with MailPoet but I have an issue.

    The mails are send but this message is diplayed: «504 Gateway Time-out The server didn’t respond in time»
    and the lot of mails is often divided into two parts.

    My host asks me what resources MailPoet needs. Could you help me ?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • This bit from the documentation may help you: (http://docs.mailpoet.com/article/48-wp-cron-batch-emails-sending-frequency)

    The speed of your server matters. MailPoet usually takes 1 second on average to send each newsletter/email. In this 1 second, MailPoet processes the subscriber data, parses the shortcodes within it, generates the email code, records this information in the database and connects to the service to send the email.

    There is also a PHP variable setup on your server called max_execution_time. This variable determines the amount of time, in seconds, a PHP script can execute, until it’s been shut down by the PHP process. The default value for most of the servers is 30, which means 30 seconds to run. So, on average, MailPoet will be able to send 30 newsletters/emails until this process is shut down.

    That’s why increasing this value will also increase the amount of emails per batch that you can send.

    If your server is very fast, but the max_execution_time is set to 30 seconds, then it won’t matter. MailPoet will only be able to send 30 emails per batch. By “per batch” we mean the custom interval you set.

    Example: A sending frequency of 100 emails each 5 minutes, means that during each cycle of 5 minutes (the interval), MailPoet will try to send 100 emails.

    So make sure your max_execution_time is at least set up to: 100

    This explains why trying to send 1000 emails per batch won’t work, even if it is technically allowed by your server or third party service!

    Plugin Author MailPoet

    (@wysija)

    Thanks @rphi, that’s exactly what’s needed for your website to run MailPoet without any hiccups during the sending process.

    Hi,

    My parameters in MailPoet:
    phpmail
    70 mails per hour

    The server have:
    php 5.6.8
    max_execution_time 120
    Memory_limit 128M

    So, I don’t understand what’s going on?
    What other parameters should be looked at?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Time-out when sending newsletter’ is closed to new replies.