Jump to content
salmiak

Error: Unable to write lock file: /site/assets/cache/LazyCronLock.cache

Recommended Posts

I often get this error:
Unable to write lock file: /site/assets/cache/LazyCronLock.cache

In tracy logs: PHP Warning: file_put_contents(/path/to/site/assets/cache/LazyCron.cache): failed to open stream: Access denied in /path/to/wire/modules/LazyCron.module:209

I tried to give the site/assets/cache folder 777 permissions but this doesn't solve it.

Share this post


Link to post
Share on other sites

Did you try giving the LazyCronLock.cache file 664 permissions?

Share this post


Link to post
Share on other sites

Ok it's a different error now in tracy logs:
PHP Warning: file_put_contents(): Exclusive locks are not supported for this stream

Share this post


Link to post
Share on other sites

Ok I sort of found out what was the reason is and that that was also causing some other problem I've been trying to figure out.

My site is hosted on an NFS volume and because of some delays between the server and the nfs volume things go wrong under load.
If the load is somewhat bigger it causes my website to stop responding at all. Leaving the database full of sleeping processes.

My fix for now is immidiatly returning from afterPageView(HookEvent $e) in the LazyCron.module.

This obviously solves both problems. But I like to solve it in a better way:

  • Does the core need LazyCron?
  • And is there some way I can make LazyCron use the database instead of the filesystem?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...