Forums / Developer / Static cache and time

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