• Resolved jeffmart

    (@jeffmart)


    I’ve been using the WP Mail SMTP plugin on several websites for some time now. And I’ve never seen this before… It is overloading the site with a task (wp_mail_smtp_queue_process) scheduled in CROM once a minute, and rescheduling a new repetitive task with each next execution (in recurrence), exploding our CPU consumption. I’ve already tried to control it with wp-hartbreak and WP Crontrol, but I wasn’t successful… It keeps creating the recurring task (with each recurrence). It generated a list of more than 17 thousand cron tasks… And I can’t delete the completed ones either. Can you help?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Victoria Sakal

    (@sakalvictoria)

    Hi, @jeffmart!

    Thanks for getting in touch, and I’m sorry for the trouble!

    I’ve reached out to our development team with this and I’ll update you as soon as I know more.

    Thank you.

    Plugin Support Victoria Sakal

    (@sakalvictoria)

    Hi, @jeffmart!

    Thanks for your patience.

    We use the wp_mail_smtp_queue_process task for the Optimized email-sending feature. If you disable this feature, the queue task should be unscheduled.

    Also, here is the code snippet that will remove all “completed” actions after each queue run. So, you can continue to use Optimized email sending with this snippet:

    // Remove all "wp_mail_smtp_queue_process" scheduled actions with completed status.
    add_action( 'action_scheduler_after_process_queue', function () {
    
      global $wpdb;
    
      $wpdb->query( 'DELETE FROM ' . $wpdb->prefix . 'actionscheduler_actions WHERE hook = "wp_mail_smtp_queue_process" AND status = "complete"' );
    } );

    Kind regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to disable wp_mail_smtp_queue_process “Every minute”?’ is closed to new replies.