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.

eZ debug

Timing: Jan 18 2025 11:33:40
Script start
Timing: Jan 18 2025 11:33:40
Module start 'layout'
Timing: Jan 18 2025 11:33:40
Module start 'content'
Timing: Jan 18 2025 11:33:41
Module end 'content'
Timing: Jan 18 2025 11:33:41
Script end

Main resources:

Total runtime0.8562 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 589.2188152.6094
Module start 'layout' 0.00710.0039 741.828139.4297
Module start 'content' 0.01100.8439 781.2578631.0625
Module end 'content' 0.85480.0014 1,412.320316.1953
Script end 0.8562  1,428.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4393160.0002
Check MTime0.00170.1988160.0001
Mysql Total
Database connection0.00220.258010.0022
Mysqli_queries0.786391.8342680.0116
Looping result0.00070.0772660.0000
Template Total0.815795.320.4079
Template load0.00190.226520.0010
Template processing0.813895.039120.4069
Template load and register function0.00010.011810.0001
states
state_id_array0.00140.166410.0014
state_identifier_array0.00140.159720.0007
Override
Cache load0.00160.1914680.0000
Sytem overhead
Fetch class attribute can translate value0.00060.064830.0002
Fetch class attribute name0.00110.125880.0001
XML
Image XML parsing0.00110.124230.0004
class_abstraction
Instantiating content class attribute0.00000.0021100.0000
General
dbfile0.00110.1270210.0001
String conversion0.00030.035340.0001
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
17content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
11content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 40
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs