Forums / Suggestions / Memcache

Memcache

Author Message

Xavier Dutoit

Tuesday 08 August 2006 6:37:18 am

Hi,

I'm happy to report that I've been able, following liu advices and some extra config, to have a fully working ez config on lighthttp.

I'm going to use it for a few days and tell you if I see a problem.

X+

http://www.sydesy.com

Gunnstein Lye

Friday 25 August 2006 2:01:30 pm

Xavier,

Could you share your solution for eZ publish on lighttpd, please?

I have a basic setup here on my laptop, but the search is not working.

regards

Xavier Dutoit

Friday 25 August 2006 11:05:52 pm

Hi,

Here it comes:

url.rewrite-once = (
"^/.*\.(css|html|htm|pdf|js|ico|png|gif|jpe?g)$" => "$0",
"^/.*?(\?.*)?$" => "/index.php$1"

http://www.sydesy.com

Gunnstein Lye

Saturday 26 August 2006 10:09:31 am

Thanks for the help!

My search is still not working.. but it is probably something else on my setup. I have included the settings I think are vital (NB: my site is not statically cached yet).

It basically works - the site is running, I can navigate it using urls like
http://localhost/index.php?/blog_site
http://localhost/index.php?/blog_site_admin

Only the search does not work. It generates a link like this:
http://localhost/index.php?SearchText=searchterm&x=8&y=13
which fails with a "Module not found" in eZ publish.

Apparently, the problem is the question mark in the URL - I see from your rewrite rule that you are handling it somehow, but it fails on my setup - any hints?

Gunnstein

server.modules              = (
                                "mod_rewrite",
                                "mod_access",
                                "mod_fastcgi",
                                "mod_simple_vhost",
                                "mod_accesslog" )

server.document-root        = "/srv/www/htdocs/lighttpd/"

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

# Virtual hosts - I don't really know how this works
simple-vhost.server-root   = "/srv/www/htdocs/lighttpd/"
simple-vhost.default-host  = "localhost"
simple-vhost.document-root = "/"

fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/tmp/php-fastcgi.socket",
                                   "bin-path" => "/usr/local/bin/php",
                                   "max-procs" => 2,
                                   "bin-environment" => (
                                     "PHP_FCGI_CHILDREN" => "16",
                                     "PHP_FCGI_MAX_REQUESTS" => "10000"
                                   ),
                                   "bin-copy-environment" => (
                                     "PATH", "SHELL", "USER"
                                   ),
                                   "broken-scriptfilename" => "enable"
                                 )
                               )
                             )

url.rewrite-once = (
  "^/.*\.(css|html|htm|pdf|js|ico|png|gif|jpe?g)$" => "$0",
  "^/.*?(\?.*)?$" => "/index.php$1"
)

Gunnstein Lye

Sunday 27 August 2006 7:07:22 am

Update: With virtual host (ForceVirtualHost=true in site.ini) it works perfectly.

Juliusz Calyniuk

Tuesday 29 August 2006 3:08:43 am

Hi Gunnstein,

Do you have an access to creating temporary tables in the database?
Perhaps this is a problem with MySQL configuration.

Regards

WebStyle Systems | http://www.ws-webstyle.com

Gunnstein Lye

Tuesday 29 August 2006 3:25:15 am

As I said above, it works now, with ForceVirtualHost. I don't think mysql has anything to do with it.
regards

Juliusz Calyniuk

Tuesday 29 August 2006 3:51:38 am

Sorry, I thought you have still pb with the searching. Forget it, please :)

WebStyle Systems | http://www.ws-webstyle.com

Dwi H

Tuesday 24 June 2008 1:25:58 pm

Any body know how to setup memcached on PHP 5, and sample of of code implementation on custom PHP site.

http://www.pogung177.com - http://www.no1-hosting.net

André R.

Tuesday 24 June 2008 11:55:11 pm

Api doc is here:
http://php.net/memcache

And there is a link there to examples if the ones on each function isn't complete enough(and their not, so good that it's there :) ).

Or many of the hits you get when you search for it on google:
http://www.mysqlperformanceblog.com/2006/08/09/cache-performance-comparison/

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

eZ debug

Timing: Jan 18 2025 04:17:35
Script start
Timing: Jan 18 2025 04:17:35
Module start 'content'
Timing: Jan 18 2025 04:17:36
Module end 'content'
Timing: Jan 18 2025 04:17:36
Script end

Main resources:

Total runtime1.0519 sec
Peak memory usage4,096.0000 KB
Database Queries226

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.5234180.8516
Module start 'content' 0.00550.9099 770.37501,110.2344
Module end 'content' 0.91540.1365 1,880.6094373.3594
Script end 1.0519  2,253.9688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00460.4373220.0002
Check MTime0.00150.1395220.0001
Mysql Total
Database connection0.00060.060910.0006
Mysqli_queries0.918587.31772260.0041
Looping result0.00250.23422230.0000
Template Total1.019997.020.5100
Template load0.00190.183120.0010
Template processing1.018096.770620.5090
Template load and register function0.00010.009010.0001
states
state_id_array0.00070.071210.0007
state_identifier_array0.00100.094720.0005
Override
Cache load0.00170.1649600.0000
Sytem overhead
Fetch class attribute can translate value0.00110.109360.0002
Fetch class attribute name0.00080.0747150.0001
XML
Image XML parsing0.00320.308860.0005
class_abstraction
Instantiating content class attribute0.00010.0081220.0000
General
dbfile0.00250.2386560.0000
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
10content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
15content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 45
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs