Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty cache sometimes create empty files.
Goto page Previous  1, 2
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Fri Feb 28, 2014 2:21 pm    Post subject: Reply with quote

Is this a single server or a cluster? Is the cache on a shared file system? What exactly has changed in your environment aside from PHP? Are you able to run a test with a "downgraded" version of PHP, leaving all other environment conditions the same?
Back to top
View user's profile Send private message Visit poster's website
Moggia
Smarty Rookie


Joined: 24 Nov 2009
Posts: 11

PostPosted: Sat Mar 01, 2014 12:31 pm    Post subject: Reply with quote

It's several load balanced single servers, and the error occurs on all of them.
The cache is on a ram disk in test and production, and on a disk on dev.
The only thing that has changed is that our production environment now uses Ubuntu Linux instead of Red Hat Linux. But I have seen the error also on dev, and in development we use OS X.

The error is very hard to reproduce cause it happens so rarely. Actually in production we keep a log of a certain part of our website that uses Smarty cache, and every time the cache is empty we log it. And for some reason the error started do decline in frequency on the 30th of January, and we haven't seen any error in February! Very strange cause we can't think of any changes we have done.

Anyway, just the other day I saw the same error on my own computer in development using OS X and Smarty 3 - so that's why I am not completely confident that the error is gone. But we will deploy our upgraded Site tomorrow - using Smarty 3 - and we will keep logging any empty cache file - so that will be very interesting.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Sun Mar 02, 2014 12:10 am    Post subject: Reply with quote

What do you use for a shared file system? I know I've seen spurious race condition problems with NFS cache before, but nothing that affected the end-user.
Back to top
View user's profile Send private message Visit poster's website
Moggia
Smarty Rookie


Joined: 24 Nov 2009
Posts: 11

PostPosted: Sun Mar 02, 2014 12:05 pm    Post subject: Reply with quote

Actually we don't use a shared file system. Instead we have built an cache overlay that broadcasts which file(s) should be cleansed on the local network.
Back to top
View user's profile Send private message
Moggia
Smarty Rookie


Joined: 24 Nov 2009
Posts: 11

PostPosted: Tue Mar 04, 2014 10:31 am    Post subject: Reply with quote

We are now done with deploying a painful (thousands of templates and lot's of things that didn't work anymore) upgrade to Smarty3!

And what we can see right now the problem with empty cache files are gone!

Smile

Thanks everyone for your input.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP