High traffic after sending out mass mailing brings down server with 3 WP accounts
We have a Constant Contact mailing list of about 24k that we send out on a regular basis. Pretty much every single time we do so within 30 minutes of having Constant Contact starting to send the mailing the main site gets hammered hard. We have limits set on it as high as we can without making things potentially unstable. Server has 8GB of ram and 8 cores running on NVME storage.
When the mailings go out our main site almost always goes down for a few minutes with resource 503 errors. That isn't good but it also isn't super bad because it usually clears within a minute or two. Sometimes though it is much worse. This last time when we sent it out it was so bad it didn't just take the one site down it made the whole server lag so badly for almost an hour and a half that when we noticed we had to restart it from the VPS panel to get back in.
The main Wordpress site has a ton of plugins all of which are being used regularly so we can't strip much out.
Things we have done:
-
moved to this newer, faster VPS
-
turned off WPCron and use Cpanel cron jobs
-
ran mysqltuner on the server and adjusted the my.cnf as appropriate
-
installed wordfence on all three sites and dabbled with rate limiting on it but not sure what we should use for settings.
-
server already had CSF firewall on it
-
we can't use a traditional WP cache plugin because it screws up the output of some of the other plugins. We've tried multiple options and can never get it to work properly without errors.
Any ideas on anything else we can try? We have looked at our constant contact logs and can see that a lot of our recipients are clicking every single link very shortly after they are delivered which makes me think that either they have infected PCs or else their security software is checking each link before delivering it to their inbox.
We really don't want to have to upgrade again to a bigger VPS account. Any ideas for stuff we haven't done yet would be greatly appreciated.
-
Hello ,
When sending bulk emails from the website, multiple database queries are executed simultaneously. This can overload the CPU or RAM, leading to high server resource usage and resulting in 500 or 503 errors on the website. Since you’re not planning to upgrade your VPS, it’s better to limit the email sending rate to prevent resource exhaustion.For example, if your server can handle around 10,000 emails per hour, consider reducing the rate to 5,000 per hour to maintain stability. Additionally, review and optimize your MariaDB (my.cnf) configuration for better performance—focusing on parameters like innodb_buffer_pool_size, max_connections, and query_cache_size.
To simplify optimization, cPanel has recently added a tool inside WHM: WHM >> Edit Database Configuration. This tool provides recommendations tailored to your specific server based on its current workload, which can help you fine-tune your MariaDB settings more effectively.0 -
Considering you only have three sites, did you ever consider putting them behind Cloudflare? Despite the issues you report with caching plugins, that might not happen with Cloudflare doing the caching (although we cache on the server side and at CF).
If you're SQL tables aren't all InnoDB, I'd suggest you consider converting them to InnoDB. (of course, if you do that you'll have to retune MySQL for the increased usage of InnoDB) I've found the "Index WP MysQL For Speed' plugin quite useful.
0 -
Hello maestroc,
In addition, to help improve your site's performance and better handle traffic surges, especially during events like mailings, we recommend implementing the following strategies.
- Implement a caching service like Redis or Memcached can significantly reduce database load by storing frequently accessed data in memory, leading to faster response times.
- Setting up Nginx as a reverse proxy in front of your server can efficiently serve static content and manage connections. A major benefit is, which can serve entire pages without hitting the PHP/MySQL backend for returning visitors.
- We strongly recommend placing your site behind Cloudflare. Enabling features like "Under Attack Mode" during high-traffic events (like mailings) will help mitigate bot traffic and DDoS attempts before they reach your server.
- For optimal performance with limited resources, you might consider LiteSpeed Web Server. It is highly efficient and offers excellent compatibility with existing setups.
We believe these steps will greatly enhance your platform's stability and speed during any events. Please let us know if you have any questions or need further clarification.
Regards,
TechAmigo Support0 -
Have you reached out to your host yet to see if maybe they are throttling the service, due to how close it is between the issues, and all the emails being sent out?
0 -
TechAmigo Support ChatGPT Champion over there.
maestroc This is a super common issue and can almost guarantee you its due to a link checking service, example Microsoft:
https://learn.microsoft.com/en-us/defender-office-365/safe-links-about
For every single email you send out, regardless if each email contains the same link, that service will check every single link in the email for every email received. Regardless if the actual recipient is looking at the email. If you are not using caching then this traffic especially on a mailing list that large will easily overwhelm your server. Even if you are caching, if you are using UTM tracking paramters or any kind of querystring that will most likely bypass the cache, especially if the value of the parameter is unique per link.
The best way to deal with it is use Cloudflare to cache your HTML and also ensure you are ignoring querystrings that are tied to those links, usually you will have for example: utm_medium=emailSo if the URL contains utm_medium=email, ignore querystrings this way it serves a cached page since Cloudflare treats every URL and parameter/value as a unique link it requires its own cache hence a endless chain of uncached hits = your server goes down.
You can also block Microsoft's ASN(Excluding verified bots) AND if the URL contains that querystring, but this usually then marks the link as unsafe and may prevent visitors from clicking the links then, usually only necessary if caching is not possible.
Hope this helps.
0
Please sign in to leave a comment.
Comments
5 comments