Back to GD Mail Queue (Lite) Forum

GD Mail Queue and wp-cron issue?

Published on: March 19, 2022 at 4:48 pm · By: Tony
Author
Topic
#74573

My sites are periodically becoming unavailable for ca 28 or 58 minutes at a time. For the multisite ones, all the subsites become unavailable for the same period.
I have pressed my ISP for help/insight and they have come up with the following:

From what I see, the websites below are hitting the FPM limits and this results in the websites’ application pools to get filled with requests which do not close properly. Once full, any new requests are only going through if one of the used ones is cleared. That is why you weren’t able to access the websites, due to them most probably timing out on your end.

This usually happens if there are WordPress websites using wp-cron. Wp-cron is a system that WordPress utilizes to mimic a standard server’s crontab function – but it is utilized through the site itself. However there is one catch – wp-crons will not run, unless someone visits the site. So, now let’s say some sort of a bot or a visitor browses the site too much – each page requested may trigger another wp-cron run – especially if they have crons set to run every minute (and they do very often).
What happens is that the cron will start a process, that will occupy a php worker on the server and before it finishes it will
start again, occupying even more resources, until gradually the server stops serving new requests until it clears the old ones.

You can check that with your developer to see how to replace wp-cron with actual server-side cronjob.

I am considering whether GD Mail Queue is generating wp-crons. I have the interval set to 5 minutes.
Have you seen this issue and is there any possibility of using a server-side cronjob instead?

Viewing 1 replies (of 1 total)
Author
Replies
  • #74578

    My plugin registers one cron job at the interval you set (in your case 5 minutes). And, it runs very limited number of queries on each run, so I doubt it can cause such issues. I run the plugin with even smaller interval (2 minutes), and I had no issues. But, it depends on hosting, and on other plugins you might have.

    Overall, even with 5 minutes interval, my plugin is very lightweight when it comes to queue runs, so I am doubtful it is to blame. Your hosting should be able to identify what runs the usage so much to bring down the website, and if that same thing repeats often.

    Milan

    Dev4Press - Premium plugins for WordPress.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.