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

[4.x]: could not acquire a lock to save the element #13783

Open
bowen31337 opened this issue Oct 4, 2023 · 1 comment
Open

[4.x]: could not acquire a lock to save the element #13783

bowen31337 opened this issue Oct 4, 2023 · 1 comment

Comments

@bowen31337
Copy link

bowen31337 commented Oct 4, 2023

What happened?

Description

when an entry is edited and saved, the error occurs with message "Could not acquire a lock to save the element."

Steps to reproduce

  1. login in admin panel
  2. go to entries
  3. edit an entry
  4. save the edited entry
  5. page will be directed to an error page
image

Expected behavior

the edited entry should be saved successfully.

Actual behavior

the error shows, the stack trace is:
{
"trace": [
"#0 [internal function]: craft\controllers\ElementsController->actionApplyDraft()",
"#1 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)",
"#2 /app/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)",
"#3 /app/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('apply-draft', Array)",
"#4 /app/vendor/craftcms/cms/src/web/Application.php(304): yii\base\Module->runAction('elements/apply-...', Array)",
"#5 /app/vendor/craftcms/cms/src/web/Application.php(607): craft\web\Application->runAction('elements/apply-...', Array)",
"#6 /app/vendor/craftcms/cms/src/web/Application.php(283): craft\web\Application->_processActionRequest(Object(craft\web\Request))",
"#7 /app/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))",
"#8 /app/web/index.php(12): yii\base\Application->run()",
"#9 {main}"
],
"memory": 29816648,
"exception": "[object] (yii\web\ServerErrorHttpException(code: 0): Could not acquire a lock to save the element. at /app/vendor/craftcms/cms/src/controllers/ElementsController.php:1447)"
}

Craft CMS version

Craft Pro 4.5.6.1

PHP version

8.0.30

Operating system and version

Linux 6.2.0-1012-aws

Database type and version

PostgreSQL 15.3

Image driver and version

Imagick 3.7.0 (ImageMagick 7.1.0-50)

Installed plugins and versions

  • Amazon S3 | 2.0.3
  • Navigation | 2.0.21
  • Redactor | 3.0.4
@i-just
Copy link
Contributor

i-just commented Oct 12, 2023

Hi, thanks for getting in touch!

Do you have any custom configuration for mutex?

By default, mutex locks are files stored in storage/runtime/mutex. Can you start by clearing that directory and check if that fixes the issue? If it then happens again, have a look through the logs (starting with storage/logs/phperrors.log) and see if there’s anything there that looks like it could be related?

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

No branches or pull requests

2 participants