Problem: You’re getting a dev environment setup for craft on your system and every update or plug-in install fails with an error message:

Status: Internal Server Error
Response: {"error":"unlink(/vagrant/craft/storage/runtime/mutex/xxxx.lock): Text file busy"}

Solution: You’re on windows. Yii has a different mutex mechanism on windows and by virtue of sharing a folder from a windows host; you’ve inherited some of the idiosyncrasies of the windows file system.

CraftCMS creator discusses this issue in a github issue: https://github.com/craftcms/cms/issues/4355

You’ll need to add this to your craft/config/app.php file.

return [
    'components' => [
        'mutex' => function() {
            $config = craft\helpers\App::mutexConfig();
            $config['isWindows'] = true;
            return Craft::createObject($config);
        },
    ],
];

This was actually an issue in Yii which Craft reported to the Yii framework.

Tags

Verified by MonsterInsights