yii2: FileMutex: unlink(...): No such file or directory

What steps will reproduce the problem?

doing many parallel locks

What is the expected result?

no error

What do you get instead?

No such file or directory in unlink($this->getLockFilePath($name));

Additional info

Q A
Yii version 2.0.10
PHP version 5.5.9
Operating system linux Ubuntu 14.04.4

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

No, unless you run many short-living locks/scripts in parallel, which is uncommon I think.

I’m using locks in such scenario. And locks can be useful in web app - sometimes you need do some heavy task (like image processing, that could take ~5 seconds) and you want to be sure that you will not do the same job by 20 parallel processes.

If we can’t delete lock file immediately after release, there should be garbage collector at least, which will delete old lock files.

you can call unlink on open file (Unix, I don’t know how it works on windows)