-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Running cron jobs fails if database name is too long #22240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @amenk. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @amenk do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
Hi @amenk thank you for you report, this is expected behavior, please refer to -> https://dev.mysql.com/doc/refman/5.7/en/locking-functions.html |
@amenk |
Thanks for the info --- but can't we then just create the lock name in another way? For example by hashing it ? What is the maximum table name length? then we should enforce a shorter cron group name or so ... |
This is not expected behaviour. With constraints Magento creates a shorter name when they are too long. It should do the same here. |
I am able to replicate this, but it is manifesting in a confusing admin panel with no menu items loading. The error was being thrown in the log and changing to developer mode threw the error and it would seem it is because my database schema name is 40 characters long, so when the Database lock is loaded, when the prefix is added, the length is greater than 64 and the error is being thrown. Is there a way we can trim the lock name to keep it under 64 to avoid hours of confusion in the future? That would be great. |
@engcom-backlog-nazar can you reopen this issue? |
Also... see this example of a lock |
Create short name for Database Lock name
Hi @amenk. Thank you for your report.
The fix will be available with the upcoming 2.3.5 release. |
Preconditions (*)
Database is called
shop_test_com_testing_foo_de
You have crontab.xml
Steps to reproduce (*)
Expected result (*)
works
Actual result (*)
doesn't
The text was updated successfully, but these errors were encountered: