Static cache and time

Author Message

Sylvain Guittard

Thursday 28 February 2008 1:37:21 am

Hi,

I have a website on eZ Publish (3.9.4) and I would generate a static cache. All parameters are correctly configured. When I execute the php script (php bin/php/makestaticcache.php -s fre -d), I have this output:

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

Total script time: 120.0923 sec

I have a webpage that is very long to display; and I want to increase the time to makestaticcache.php to avoid this error.
I would like to know if is that possible and how to do this

Thanks
Sylvain

http://www.vignevin-epicure.com
http://twitter.com/vignevinEPIcure

Mariusz Bułkowski

Thursday 28 February 2008 2:00:04 am

What did you write in

[CacheSettings]
HostName=....

Portable Ultrasound http://www.draminski.com

Sylvain Guittard

Thursday 28 February 2008 2:18:58 am

Hi Mariusz,

I have this:

[CacheSettings]
HostName=www.monsite.fr
StaticStorageDir=static
MaxCacheDepth=5
CachedURLArray[]=/
CachedURLArray[]=/votre_sejour/ou_dormir/les_hotels
CachedURLArray[]=/votre_sejour/ou_dormir/les_meubles
AlwaysUpdateArray[]
AlwaysUpdateArray[]=/

I precise that the first content (votre_sejour/ou_dormir/les_hotels) is correctly generated. The second page needs more time to display.

Sylvain

http://www.vignevin-epicure.com
http://twitter.com/vignevinEPIcure

Sylvain Guittard

Wednesday 05 March 2008 7:19:23 am

Nobody can tell me what is the parameter used to stop the request of a page when generating the cache?
Is it a parameter in a ez publish file ( .ini ) or a parameter of my server?

Thx.

http://www.vignevin-epicure.com
http://twitter.com/vignevinEPIcure

André R.

Wednesday 05 March 2008 1:52:32 pm

There is no such parameter in ez, you have better luck at increasing the run time in apache / php.

Code used to get content (kernel/classes/ezstaticcache.php):

                        if ( $content === false )
                        {
                            $content = @file_get_contents( $fileName );
                        }
                        if ( $content === false )
                        {
                            eZDebug::writeNotice( "Could not grab content (from $fileName), is the hostname correct and Apache running?",
                                                  'Static Cache' );
                        }
                        else
                        {
                            $this->storeCachedFile( $file, $content );
                        }

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Sylvain Guittard

Friday 07 March 2008 1:49:30 am

Thanks André.

You're right. In my case, I've increased the "default_socket_timeout" in my php.ini

http://www.vignevin-epicure.com
http://twitter.com/vignevinEPIcure

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 10:42:00
Script start
Timing: Jan 18 2025 10:42:00
Module start 'layout'
Timing: Jan 18 2025 10:42:00
Module start 'content'
Timing: Jan 18 2025 10:42:00
Module end 'content'
Timing: Jan 18 2025 10:42:00
Script end

Main resources:

Total runtime0.9215 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.0059 587.8906152.6094
Module start 'layout' 0.00590.0034 740.500039.4141
Module start 'content' 0.00920.9109 779.9141615.9219
Module end 'content' 0.92010.0014 1,395.835916.1875
Script end 0.9215  1,412.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3604160.0002
Check MTime0.00140.1495160.0001
Mysql Total
Database connection0.00090.101110.0009
Mysqli_queries0.865793.9452680.0127
Looping result0.00060.0682660.0000
Template Total0.885896.120.4429
Template load0.00210.225120.0010
Template processing0.883795.895920.4419
Template load and register function0.00020.024810.0002
states
state_id_array0.00100.109710.0010
state_identifier_array0.00190.208520.0010
Override
Cache load0.00170.1869320.0001
Sytem overhead
Fetch class attribute can translate value0.00080.084730.0003
Fetch class attribute name0.00120.127980.0001
XML
Image XML parsing0.00110.123630.0004
class_abstraction
Instantiating content class attribute0.00000.001280.0000
General
dbfile0.00100.1059230.0000
String conversion0.00000.000940.0000
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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs