Domanda

Unable to send any kind emails (order, invoice, tracking). I get confirmation that it was sent, but nothing received. Same with "Contact us" from frontend.

cron.log:

main.WARNING: Could not acquire lock for cron job: sales_send_order_emails

main.WARNING: Could not acquire lock for cron job: sales_send_order_shipment_emails

main.WARNING: Could not acquire lock for cron job: sales_send_order_invoice_emails

main.WARNING: Could not acquire lock for cron job: outdated_authentication_failures_cleanup

main.WARNING: Could not acquire lock for cron job: bulk_cleanup

Permissions are correct (i think): enter image description here enter image description here

Magento 2.3.5-p2, PHP 7.2

Problem persisted after upgrade to Magento 2.4 and PHP 7.3 and 7.4

Couldn't find much online about "Could not acquire lock for cron job".

Any help will do.

È stato utile?

Soluzione 2

Apparently it was fault with permissions in

/var/spool/mqueue

and

/var/spool/mqueue-client

Changing permissions got rid of these errors.

enter image description here

Altri suggerimenti

I guess Magento cron job is stuck in "running" status. Need to kill the stuck cron job then it will continue as scheduled.

  1. Log in to your account using SSH.
  2. Run the following command to locate hanging cron jobs: $ ps ufx | grep cron
  3. To stop the cron from running, kill the command by referencing the PID. Run the following command to terminate the command: $ kill -9 PID

For more detail, please refer to these links: Link-1 Link-2

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top