Skip to content

Running cron jobs fails if database name is too long #22240

@amenk

Description

@amenk

Preconditions (*)

Database is called
shop_test_com_testing_foo_de

You have crontab.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="update_virtual_attributes">

Steps to reproduce (*)

  1. bin/magento cron:run -v

Expected result (*)

works

Actual result (*)

doesn't

  [Magento\Framework\Exception\InputException]                                             
  Lock name too long: shop_test_com_testing_foo_de|CRON_GROUP_update_virtual_attribute...  
	                                                                                   

Exception trace:
 () at /var/www/html/shop.test.com.testing.foo.de/web/vendor/magento/framework/Lock/Backend/Database.php:156
 Magento\Framework\Lock\Backend\Database->addPrefix() at /var/www/html/shop.test.com.testing.foo.de/web/vendor/magento/framework/Lock/Backend/Database.php:66
 Magento\Framework\Lock\Backend\Database->lock() at /var/www/html/shop.test.com.testing.foo.de/web/vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php:259
 Magento\Cron\Observer\ProcessCronQueueObserver->lockGroup() at /var/www/html/shop.test.com.testing.foo.de/web/vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php:241
 Magento\Cron\Observer\ProcessCronQueueObserver->execute() at /var/www/html/shop.test.com.testing.foo.de/web/vendor/magento/framework/Event/Invoker/InvokerDefault.php:72
 Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod() at /var/www/html/shop.test.com.testing.foo.de/web/vendor/magento/framework/Event/Invoker/InvokerDefault.php:60
 Magento\Framework\Event\Invoker\InvokerDefault->dispatch() at /var/www/html/shop.test.com.testing.foo.de/web/vendor/magento/framework/Event/Manager.php:66
 Magento\Framework\Event\Manager->dispatch() at /var/www/html/shop.test.com.testing.foo.de/web/generated/code/Magento/Framework/Event/Manager/Proxy.php:95
 Magento\Framework\Event\Manager\Proxy->dispatch() at /var/www/html/shop.test.com.testing.foo.de/web/vendor/magento/framework/App/Cron.php:86
 Magento\Framework\App\Cron->launch() at /var/www/html/shop.test.com.testing.foo.de/web/vendor/magento/module-cron/Console/Command/CronCommand.php:117
 Magento\Cron\Console\Command\CronCommand->execute() at /var/www/html/shop.test.com.testing.foo.de/web/vendor/symfony/console/Command/Command.php:245
 Symfony\Component\Console\Command\Command->run() at /var/www/html/shop.test.com.testing.foo.de/web/vendor/symfony/console/Application.php:835
 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/shop.test.com.testing.foo.de/web/vendor/symfony/console/Application.php:185
 Symfony\Component\Console\Application->doRun() at /var/www/html/shop.test.com.testing.foo.de/web/vendor/magento/framework/Console/Cli.php:102
 Magento\Framework\Console\Cli->doRun() at /var/www/html/shop.test.com.testing.foo.de/web/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at /var/www/html/shop.test.com.testing.foo.de/web/bin/magento:23

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Format is validGate 1 Passed. Automatic verification of issue format passed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions