Forums / General / Clustering and ezdbfile name

Clustering and ezdbfile name

Author Message

Carlos Revillo

Thursday 05 June 2008 1:40:35 am

Hello.
We're working in a clustering environment for ez 3.9.2, so we've followed the steps shown at
http://ez.no/doc/ez_publish/technical_manual/3_9/features/clustering/setting_it_up

All works quite well, but we're having problems with the name file in ezdbfile table created.

Looking at definition of the tables suggested we can see

CREATE TABLE ezdbfile (
  id        MEDIUMINT(8) UNSIGNED NOT NULL auto_increment,
  datatype  VARCHAR(60)  NOT NULL DEFAULT 'application/octet-stream',
  name      VARCHAR(255) NOT NULL DEFAULT '',
  name_hash VARCHAR(34)  NOT NULL DEFAULT '',
  scope     VARCHAR(20)  NOT NULL DEFAULT '',
  size      BIGINT(20)   UNSIGNED NOT NULL,
  mtime     INT(11)      NOT NULL DEFAULT '0',
  PRIMARY KEY (id),
  UNIQUE INDEX ezdbfile_name (name),
  UNIQUE INDEX ezdbfile_name_hash (name_hash)
) ENGINE=InnoDB;

but this limits the length of the name files to only 255 characters. We have a contentstructure with several levels, and this levels have long names. The result is that we have file images name for about 280 and maybe 300 characters. So, this names are not entirely recorded and the db, and that's because we're thinking we're having problems with several images.

So, is there any workaround for this? We have reading we can define a bigger varchar field and mysql will convert it to another type, but anyone knows if this could cause any kind of problems?

Thank you.

Bruce Morrison

Thursday 05 June 2008 2:20:59 am

Hi Carlos

I've been running a clustered site for quite a while and can't say I've noticed any trouble with the length of this field.

I've just checked and there does appear be be some entries that are at the 255 char limit and truncated. I'll have to check that out!

I did find that there was an issue with the size of the "id" field in that we ran out of id's. When mysql gets to a limit of the auto increment field inserts fail. To solve ezdbfile.id & ezdbfile_data.id & ezdbfile_data.masterid where all changed to bigint(20) unsigned.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Carlos Revillo

Thursday 05 June 2008 2:27:17 am

Thanks so much for your reply.

I think we still haven't this issue with medium int but is good to know. We have clusterized this installation yesterday and we haven't any problems with the insertion of the files. All files seems to be in the ezdbfile table, but, as i said before, some of their names are truncated.

i'll let you know about. thanks.

Gaetano Giunta

Thursday 05 June 2008 2:28:42 pm

If you're running on mysql 5.0.3+, you can up the size of the name field to 65535 (a little bit less, actually: that's max length for the whole row, so you have to subtract the other fields length).

On mysql 5.0.2-, max length for a varchar filed is sadly 255 chars.
In oracle it is btw 4000. And in postgres "something less than 1 GB". Hard to pick a long-enough value that would suit all implementations...

Principal Consultant International Business
Member of the Community Project Board

Carlos Revillo

Monday 09 June 2008 12:57:59 pm

Thanks. we're working with mysql 5.0.55.
we've altered this mysql script to create that name field as TEXT and not varchar. all works well now.

Btw, we we're talking with ez crew and they say to us that upgrading to 3.10 will be better for clustering.

thanks everybody.

eZ debug

Timing: Jan 18 2025 21:14:33
Script start
Timing: Jan 18 2025 21:14:33
Module start 'content'
Timing: Jan 18 2025 21:14:34
Module end 'content'
Timing: Jan 18 2025 21:14:34
Script end

Main resources:

Total runtime0.7969 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0098 587.7031180.8438
Module start 'content' 0.00980.6413 768.5469609.0938
Module end 'content' 0.65110.1457 1,377.6406337.3828
Script end 0.7968  1,715.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00620.7743210.0003
Check MTime0.00330.4200210.0002
Mysql Total
Database connection0.00110.142710.0011
Mysqli_queries0.714489.64492020.0035
Looping result0.00230.28372000.0000
Template Total0.764195.920.3820
Template load0.00290.360420.0014
Template processing0.761295.520120.3806
Template load and register function0.00020.026510.0002
states
state_id_array0.00100.126210.0010
state_identifier_array0.00140.177120.0007
Override
Cache load0.00230.2865340.0001
Sytem overhead
Fetch class attribute can translate value0.00100.122640.0002
Fetch class attribute name0.00130.156970.0002
XML
Image XML parsing0.00130.165840.0003
class_abstraction
Instantiating content class attribute0.00000.001970.0000
General
dbfile0.00380.4781330.0001
String conversion0.00000.000730.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs