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
Magento 2.2.5 EE
Kiwicommerce Cron Scheduler 1.0.5
Steps to reproduce
Any cron job is running for over 3 hours
kiwicommerce_cronscheduler_jobchecker cron job kills this process.
Expected result
Everything works fine
Actual result
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
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)
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.
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
Steps to reproduce
kiwicommerce_cronscheduler_jobchecker
cron job kills this process.Expected result
Actual result
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
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)
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.