Caching Trouble

Author Message

Seth Gottlieb

Thursday 30 March 2006 7:49:29 am

I must be doing something wrong because the server is performing CRAZY slow. I have eZ publish running on its own server with NO traffic (yet). The server statistics are

OS: Fedora Core 4
RAM: 1 GB
Processor: Intel(R) Pentium(R) 4 CPU 3.00GHz
Web Server: Apache2

I am running APC 3.0.10

I have read the various performance threads but have not seen success. Below are the settings that I have done. I know something is wrong because I don't see any files being written to [docroot]/static where the static views should be written to. I am fairly sure that it is not the problem of my templates because the admin interface is also intolerably slow. Does anyone have any ideas?

settings/override/site.ini.append.php:
[OverrideSettings]
Cache=enabled

[TemplateSettings]
TemplateCache=enabled
TemplateCompile=enabled
TemplateOptimization=enabled

[ContentSettings]
CacheDir=cache
ViewCaching=enabled
StaticCache=enabled
================================

settings/override/staticcache.ini.append.php:
[CacheSettings]
AlwaysUpdateArray[]=/*
CachedURLArray[]=/services*
StaticStorageDir=static
=========================================

settings/siteaccess/site_user/site.ini.append.php
[ContentSettings]
ViewCaching=enabled
TranslationList=
StaticCache=enabled

[TemplateSettings]
TemplateCache=enabled
TemplateCompile=enabled
Debug=disabled

[OverrideSettings]
Cache=enabled

Mark Marsiglio

Thursday 30 March 2006 8:08:12 am

I would check the permissions on your var directory. It could be that the cache cannot be written because it is failing on permissions.

To check this, look in the /var/yoursite/cache/ folder and see how many files are in there. Remove them and see if they are rewritten next time you load a page. Or debug output should tell you as well.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

David Boman

Thursday 30 March 2006 8:11:30 am

Also, if you run the 'bin/php/makestaticcache.php' with debug and verbose flags you will get a warning if you can't find the pages to generate the static cache from. After you have run this script successfully ther shuold be files and directories in your /static-folder.

Seth Gottlieb

Thursday 30 March 2006 9:21:54 am

The setting permissions did the trick. One thing is that when I ran the makestaticcaches.php script with debug on, I get the following message.

#################################### DEBUG ####################################
Notice: (eZMySQLDB::query(0.000 ms) query number per page:0)
SET NAMES 'latin1'

Notice: (Static Cache)
Could not grab content, is the hostname correct and Apache running?

Any ideas on this one?

David Boman

Thursday 30 March 2006 9:36:30 am

Yep. Acually I have ;)

Fiddle a little with settings in 'staticcache.ini' especially HostName. For me the wrong url was accessed.

To see what url is accessed when the makestaticcaches.php script is run i did a little hack modifing one of the kernel files...

# diff ezpublish-3.7.3/kernel/classes/ezstaticcache.php public_html/kernel/classes/ezstaticcache.php
333c333
< eZDebug::writeNotice( 'Could not grab content, is the hostname correct and Apache running?', 'Static Cache' );
---
> eZDebug::writeNotice( $fileName . ': Could not grab content, is the hostname correct and Apache running?', 'Static Cache' );

This allows me to see what really was accessed but of course you should never alter the kernel code as these changes will be overwritten if you upgrade...

Seth Gottlieb

Thursday 30 March 2006 10:51:39 am

Thanks! That worked.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.