• Resolved websmyth

    (@websmyth)


    Hi,

    We’ve been troubleshooting an issue with bbPress email notifications for a while now and think we may have narrowed it down to this plugin. Our forum is setup to notify all users (around 600-700 in total) of all new posts and replies on the forum and we use Mailgun to handle email delivery.

    When users submit a new topic/reply we’re experiencing a 502 error and the page times out. As a result, not all emails are being sent. Having spoken to WPEngine at length about what is causing this (no error log messages are being received), they’ve responded as below:

    I understand you are experiencing issues with making new forum posts and replies without receiving a 502 error. I also understand you are utilizing the bbpress-notify-nospam plugin which sends an email to every user upon new posts and replies attempting to send emails to about 700+ users within a single function.

    The issue is related to the emails attempting to be routed through SMTP in one single function. The plugin function that handles the process of sending the emails upon new posts and replies is attempting to route all 700+ emails via SMTP all at once while pulling information from the database before each email is sent. This in return is resulting in our server killing the process as it’s taking too long to complete. Our server will kill any processes that run over 60 seconds to avoid any performance issues on the server, and unfortunately, this limit cannot be modified at this time.

    I am not too familiar with the process that this plugin utilizes to pull the information for each user and send an email to them, but it appears this process needs to be broken apart a bit once you are over a set amount of users, such as attempting to send the emails in multiple batches over a certain amount of time. If you have not already, I would strongly recommend reaching out to the plugin developer to investigate this further.

    Any help would be greatly appreciated!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 16 through 17 (of 17 total)
  • Thread Starter websmyth

    (@websmyth)

    Quick update: Vinny tirelessly troubleshooted this and, after everything, it turned out to be a WP Engine limitation. Amazing support.

    If you’re reading this thread to ascertain whether to use one of UseStrict’s plugins, I’d highly recommend any of their plugins after this support experience. Thanks again!

    Plugin Author useStrict

    (@usestrict)

    Thanks for the kind words, @websmyth.

    Yeah, WP Engine will kill long-running processes, even if they’re run in the background and have timeout disabled. They also don’t offer pnctl_fork() in their environments, so forking every X seconds/emails sent won’t work.

    I thought of maybe creating a batch mailer add-on for Mailgun and Sendgrid, but I’m not sure there’d be enough interest in it to prioritize it.

    Cheers,
    Vinny

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘502 on new topic/reply submission’ is closed to new replies.