Discussion:
[TYPO3-english] typo3temp folder under NFS
Sergio Catalá
2015-01-29 11:15:38 UTC
Permalink
Hi list,

We have several servers through Varnish and we were sharing until now
typo3temp/ folder between all servers, mounted through NFS.
After upgrading, the "cache lock" problem appears.
We try several options for the NFS mount, but without success.
Would you recommend us some other tool to mount this folder that can work
properly with Typo3?

Thanks in advance,
Sergio
Loek Hilgersom
2015-01-30 16:34:40 UTC
Permalink
Hi Sergio,

I also experienced some issues with an installation having the entire filesystem
on NFS. See the thread on this list at 13-5-2014.

I'd suggest you experiment with different locking methods which you can set
through the install tool.

Which TYPO3 versions are talking about, upgrade from 4.5 to 6.2 I guess?

Afaik, problems occur with concurrent writing of files on NFS. For most files,
this is unlikely to happen as they are usually only written once and then stay,
but problems usually arise with files that are constantly rewritten. On 4.5 I
had issues with js_css_optimizer extension (which I abandoned in the end) and
with the configuration cache (temp_CACHED*), which I disabled because the hoster
couldn't move it to a non-NFS drive.

Hth,
Loek
Post by Sergio Catalá
Hi list,
We have several servers through Varnish and we were sharing until now
typo3temp/ folder between all servers, mounted through NFS.
After upgrading, the "cache lock" problem appears.
We try several options for the NFS mount, but without success.
Would you recommend us some other tool to mount this folder that can work
properly with Typo3?
Thanks in advance,
Sergio
Sergio Catalá
2015-02-01 14:28:41 UTC
Permalink
Thanks for your suggestions, Loek. I took a look to the thread you
suggested, but I still don't see a solution. What did you finally do? I saw
that Redis or Memcached were mentioned.
My upgrade was from 6.1 to 6.2. In 6.1. I never had this problem sharing
typo3temp through NFS.

Regards,
Sergio
Loek Hilgersom
2015-02-02 09:59:40 UTC
Permalink
I don't have a ready-made solution, I mentioned all steps I took in my last
post. You should really be looking at places where files are frequently being
written and rewritten. Problems could occur when 2 processes/servers are writing
the same files simultaneously. So the Cache-directory is mostly suspect, but you
may have extensions that do a lot of writing in typo3temp?

Have you tried changing the locking mechanism to flock or semaphore?

Check your server logs for file system related errors or warnings (files that
don't exist or cannot be written). They might point you in the right direction.

Redis, Memcached or other solutions provide other ways to deal with cache files,
so they may circumvent the NFS issues, but I didn't use them here.

Hth,
Loek
Post by Sergio Catalá
Thanks for your suggestions, Loek. I took a look to the thread you
suggested, but I still don't see a solution. What did you finally do? I saw
that Redis or Memcached were mentioned.
My upgrade was from 6.1 to 6.2. In 6.1. I never had this problem sharing
typo3temp through NFS.
Regards,
Sergio
Sergio Catalá
2015-02-10 13:13:33 UTC
Permalink
Hi Loek,

The problem only occurs when we clear typo3temp/Cache folder and it has to
be rebuilt again (no extensions write under typo3temp/). Then, as you
mentioned, several processes try to write the cache at the same time and,
after some minutes, we see the "Could not acquire lock" error. Only when we
restart the DNS, and no one is able to access the website (only us), we can
rebuild the cache again properly.

We tried to change the "lockingMode" parameter to (flock, or semaphore) in
the Install tool, but without success. All developers point to the fact
that the locking method is hard-coded as "simple".

After some research (here the main blueprint:
http://wiki.typo3.org/Blueprints/LockingForCaches) and talking to Markus
Klein about it, the Typo3 core is still working on a proper locking
mechanism.

He recommended me to separate the typo3temp/ folders on every machine and
not to use NFS to share it between different servers, but that didn't work
for us.

We are still pending of a solution to this problem. Every time we clear the
cache, the problem occurs again.

Regards,
Sergio
Loek Hilgersom
2015-02-12 09:35:52 UTC
Permalink
Hi Sergio,

I noticed last year that there were some unresolved issues regarding the
locking, but I also ran into some longstanding bugs in PHP in dealing with NFS
(producing incorrect warnings when unlinking files), which were still open...
(sorry, cant find it back easily).

You probably came across this thread, which isn't too hopeful for the short term
either:
https://forge.typo3.org/issues/59845

Altogether the issue is pretty tough, sorry I can't help you any further.
If you consider fixing something yourself, this maybe a useful note:
http://php.net/manual/en/function.flock.php#82521

Loek
Sergio Catalá
2015-02-12 14:25:27 UTC
Permalink
Hi Loek,
We just made the check of using NFS on one single typo3temp/ folder in one
server, and that just failed, so it is not a problem of concurrence: it is
just that NFS sucks.
After that, we decided to implant Redis as caching framework, as it seems
the most used for Typo3. And it worked for every instance separately, but
when we had to use the load balancer in the real website, we got into
problems with css and js.
We gave up with the problem finally.
We decided to use one single instance for now, and use Amazon Cloud
Computing.

Thanks for your feedback,
Sergio
Post by Loek Hilgersom
Hi Sergio,
I noticed last year that there were some unresolved issues regarding the
locking, but I also ran into some longstanding bugs in PHP in dealing with
NFS (producing incorrect warnings when unlinking files), which were still
open... (sorry, cant find it back easily).
You probably came across this thread, which isn't too hopeful for the
https://forge.typo3.org/issues/59845
Altogether the issue is pretty tough, sorry I can't help you any further.
http://php.net/manual/en/function.flock.php#82521
Loek
_______________________________________________
TYPO3-english mailing list
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Loading...