Skip to content
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

[5.x]: On New entry -> New Pages entry: a mutex exception is thrown #16321

Open
peter0503 opened this issue Dec 12, 2024 · 1 comment
Open

[5.x]: On New entry -> New Pages entry: a mutex exception is thrown #16321

peter0503 opened this issue Dec 12, 2024 · 1 comment
Labels

Comments

@peter0503
Copy link

peter0503 commented Dec 12, 2024

What happened?

Description

During the creation of a new page entry Craft is throwing a mutext exception. It does not happen always but very often. In the queue there are no pending jobs and we also tried to clear the entire caches to just make sure nothing is stucked.

we use yii\redis\Mutex

Steps to reproduce

  1. Goto entries
  2. Goto All entries
  3. Add a new entry and select new pages entry

Expected behavior

New pages entry should be created.

Actual behavior

craft\errors\MutexException: Unable to acquire a lock for the structure 1 in /app/vendor/craftcms/cms/src/services/Structures.php:511
Stack trace:
#0 /app/vendor/craftcms/cms/src/services/Structures.php(375): craft\services\Structures->_doIt()
#1 /app/vendor/craftcms/cms/src/elements/Entry.php(2695): craft\services\Structures->appendToRoot()
#2 /app/vendor/craftcms/cms/src/elements/Entry.php(2636): craft\elements\Entry->_placeInStructure()
#3 /app/vendor/craftcms/cms/src/services/Elements.php(3773): craft\elements\Entry->afterSave()
#4 /app/vendor/craftcms/cms/src/services/Elements.php(1217): craft\services\Elements->craft\services\{closure}()
#5 /app/vendor/craftcms/cms/src/services/Elements.php(3578): craft\services\Elements->ensureBulkOp()
#6 /app/vendor/craftcms/cms/src/services/Elements.php(1303): craft\services\Elements->_saveElementInternal()
#7 /app/vendor/craftcms/cms/src/services/Drafts.php(261): craft\services\Elements->saveElement()
#8 /app/vendor/craftcms/cms/src/controllers/EntriesController.php(184): craft\services\Drafts->saveElementAsDraft()
#9 [internal function]: craft\controllers\EntriesController->actionCreate()
#10 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#11 /app/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()
#12 /app/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction()
#13 /app/vendor/craftcms/cms/src/web/Application.php(350): yii\base\Module->runAction()
#14 /app/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction()
#15 /app/vendor/craftcms/cms/src/web/Application.php(318): yii\web\Application->handleRequest()
#16 /app/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest()
#17 /app/web/index.php(21): yii\base\Application->run()
#18 {main}

Craft CMS version

5.5.6

PHP version

8.3.14

Operating system and version

Linux 5.10.228-219.884.amzn2.x86_64

Database type and version

PostgreSQL 14.12

Image driver and version

GD 8.3.14

Installed plugins and versions

craftcms/aws-s3 2.2.1
putyourlightson/craft-amazon-ses 3.1.0
nystudio107/craft-code-field 5.0.0
doublesecretagency/craft-cpcss 3.0.0
doublesecretagency/craft-cpjs 3.0.0
mmikkel/cp-field-inspect 2.0.2
craftcms/feed-me 6.6.1
wbrowar/guide 4.0.0
verbb/hyper 2.2.1
verbb/icon-picker 3.0.2
nystudio107/craft-imageoptimize 5.0.3
verbb/navigation 3.0.5
spicyweb/craft-neo 5.2.19
jalendport/craft-preparse 3.0.0-alpha.2
craftcms/redactor 4.2.0
nystudio107/craft-retour 5.0.3
amici/craft-super-dynamic-fields 5.0.1
verbb/super-table 4.0.2
acclaro/translations v4.0.2
mutation/translate 4.0.2
verbb/workflow 3.0.5
internetztube/craft-element-relations 3.0.6
nystudio107/craft-seomatic 5.1.7
studioespresso/craft-dumper 5.0.1

@peter0503 peter0503 added the bug label Dec 12, 2024
@brandonkelly
Copy link
Member

Can you try removing your custom mutex component from config/app.php? As of Craft 4.6.0, the default database-driven Mutex component is very reliable, regardless of your environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants