jeudi 26 février 2015

How can I prevent 504 Gateway Timeouts when emailing many (>1,000) people from WordPress?


I'm using WordPress with BBPress and BuddyPress, and my site has some forums with over a thousand subscribers, who have signed up for instant email notification. When someone posts to one of these big forums, it calls wp_mail() about 1,300 times, which causes the server to timeout, and users to see "504 Gateway Timeout."


An ideal solution would not just increase the PHP timeout variable, but implement some sort of smart queueing of outgoing mail so that WP doesn't try to send all the emails at once. Is there a plugin or code snippet that would do this?





Aucun commentaire:

Enregistrer un commentaire