Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
File IO errors on a high traffic site

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
ikund
Smarty Rookie


Joined: 22 Nov 2011
Posts: 9

PostPosted: Wed Apr 25, 2012 8:18 am    Post subject: File IO errors on a high traffic site Reply with quote

Hi,

I recently upgraded Smarty to 3.1.5 on a site receiving 20+ requests per second.

Since the upgrade I've been having different IO-related errors, mainly:


    chmod(): No such file or directory (smarty_internal_write_file.php (Line: 61))


    filemtime(): stat failed for (... file in cache dir) - /smarty_internal_cacheresource_file.php (Line: 103)


    failed to open stream: No such file or directory (file in templates_c) - /smarty_internal_templatebase.php (Line: 165)


The errors seem to come up randomly a few times an hour.
Has anyone got any ideas why this is happening?

The server is using APC file cache.

Thanks!
Ivo
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4177
Location: Hamburg / Germany

PostPosted: Wed Apr 25, 2012 8:57 am    Post subject: Reply with quote

There is a chance for a race condition on heavily loaded systems when cache files have to be renewed.

You should updated to the newest version from SVN trunk and enable the newer cache locking feature.

Code:
$smarty->cache_locking = true;
Back to top
View user's profile Send private message
ikund
Smarty Rookie


Joined: 22 Nov 2011
Posts: 9

PostPosted: Wed Apr 25, 2012 10:27 am    Post subject: Reply with quote

Hi,

Thanks for your reply, this is good news! However, I'd probably not feel safe using a trunk build on a live site. Do you have an idea as to when will this fix appear in a more stable build?

Thanks a lot,
Ivo
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4177
Location: Hamburg / Germany

PostPosted: Wed Apr 25, 2012 10:48 am    Post subject: Reply with quote

The trunk is stable. It just contains some after 3.1.8 patches
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
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