kiwicommerce / magento2-cron-scheduler

Magento 2 - Cron Scheduler by KiwiCommerce
https://kiwicommerce.co.uk/extensions/magento2-cron-scheduler/
75 stars 40 forks source link

Killing a process after 3 hours #11

Closed agata-maksymiuk closed 4 years ago

agata-maksymiuk commented 4 years ago

Killing a process after 3 hours

Killing a process after 3 hours is really bad idea. I think it should be removed or least it should be on/off and disabled by default.

Preconditions

  1. Magento 2.2.5 EE
  2. Kiwicommerce Cron Scheduler 1.0.5

Steps to reproduce

  1. Any cron job is running for over 3 hours
  2. kiwicommerce_cronscheduler_jobchecker cron job kills this process.

Expected result

  1. Everything works fine

Actual result

  1. Next cron jobs having the same job_code are skipped, leaving error in var/log/system.log: report.WARNING: Could not acquire lock for cron group: indexer_group_reindex, skipping run

  2. Lock remains in database: mysql> select is_free_lock('database_name|CRON_GROUP_indexer_group_reindex'); +--------------------------------------------------------+ | is_free_lock('database_name|CRON_GROUP_indexer_group_reindex') | +--------------------------------------------------------+ | 0 | +--------------------------------------------------------+ 1 row in set (0.00 sec)

  3. It's impossible to remove this lock, because (according to mysql documentation) "ff the lock was not established by this thread [...] lock is not released". You need to ask your sysadmin to remove the connection and the lock.

kiwi-commerce commented 4 years ago

Hi @agata-maksymiuk , Thank you for your report. The issue has been fixed.

Related commit(s): a9e88998b6fd5c0901d00533c9714c187aea014f