Thanks for the follow-ups :-)
If this file exists: /wp-content/cache/qc-l-mutex.lock, it means that Quick Cache was either configured to use the FLOCK method for file locks; or the Semaphore method was not possible on your hosting platform; so Quick Cache is reverting the the FLOCK method as a good backup choice.
It is normal for this file to be 0 kbs: /wp-content/cache/qc-l-mutex.lock
This file exists simply as a locking mechanism (i.e. it simply needs to exist); so that Quick Cache can obtain an exclusive lock over files in this directory while it’s writing cache entries.
If you receive this error in Quick Cache comments:
Quick Cache: failed to write cache, unable to obtain a mutex lock at the moment. Quick Cache will try again later.
Here are the steps to resolve the issue.
1. Delete the existing file: /wp-content/cache/qc-l-mutex.lock
This will release any existing locks on that file, making it possible for Quick Cache to recreate the file and obtain an exclusive lock on this file once again; as it needs to.
Why would Quick Cache lose the ability to obtain an exclusive lock on this file?
It’s very uncommon for this to occur, but we have seen it happen on sites that move or change directory permissions on the /wp-content/cache/ directory; or on sites that are struggling to keep up with traffic volume; where Apache or PHP is crashing or being restarted periodically.
2. Check directory permissions on the /wp-content/cache/ directory. You need 755 or higher. Whatever is necessary for Quick Cache to have write-access to that directory. If 755 does not do it (755 does the trick on most hosting platforms); but if it does not, you may have to go all the way up to 777 with your permissions.
3. If the error continues to come back periodically, it could indicate a slow disk on the underlying server that is hosting your site (i.e. disk writes are not occurring fast enough to keep up with your traffic volume). Raising your Cache Expiration Time in the Quick Cache configuration panel can help to resolve this, because that results in fewer cache files being written by Quick Cache.
So what is the purpose of a Mutex Lock File exactly?
If two or more visitors hit the same page at the same time, and Quick Cache needs to cache (or re-cache) that page as it’s being served, only one of these visitors will trigger the cache writing routine. This is where a Mutex Lock comes in. Only one of these visitors (i.e. instances of Quick Cache) will obtain a Mutex Lock; and thus only one instance of Quick Cache creates (or recreates) the cache file for that page. The other one fails to obtain an exclusive lock; because another cache file is being written from another page view (e.g. from another instance of Quick Cache). Which is good, only one cache file should be written at a time.
This ensures that Quick Cache is only writing one new cache file at a time; and never attempting to write multiple simultaneous cache entries on a single installation. Seeing Mutex Lock notices in Quick Cache comments periodically is normal. Seeing them all the time is not. If you are seeing them all the time, it indicates a problem.
I have checked the /wp-content/cache/ directory. Permission is 755. There was a file called qc-l-mutex.lock. It was completely blank, no text. I deleted the file, it keeps coming back, still blank.
It is normal for this file to keep coming back, and it is normal for this file to be 0 kbs.
What if this file does NOT exist at all?
/wp-content/cache/qc-l-mutex.lock
That would indicate that caching is either not enabled on your installation, or that you’ve selected the Semaphore method for your Mutex Locks (see: Quick Cache Options -> Mutex File Locking). With the Semaphore method (if that’s possible on your server), Quick Cache maintains a lock through a Semaphore on the server, and this lock file is not necessary. See: http://php.net/manual/en/function.sem-get.php
The Semaphore method is recommended for extremely high traffic sites (if possible). If you configure Quick Cache to use the Semaphore method, but this file is created automatically by Quick Cache: /wp-content/cache/qc-l-mutex.lock, it means the Semaphore method is not possible in your current hosting platform; so Quick Cache is reverting to the FLOCK method automatically. See: http://php.net/manual/en/function.flock.php