ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

MySQL Error - Tools to Debug?

April 13, 2010 6:34pm

Subscribe [7]
  • #1 / Apr 13, 2010 6:34pm

    Boyink!

    5011 posts

    EE Version 1.6.8 Build:  20091201
    MySQL Version 5.0.51a-3ubuntu5.4
    MSM Installed


    I create a new field group, and then try to create a new text area field in that group. 

    On trying to save the new field I get:

    MySQL ERROR:

    Error Number: 1005

    Description: Can’t create table ‘./ee/#sql-d5b_45917.frm’ (errno: 139)

    Query: ALTER TABLE exp_weblog_data ADD COLUMN field_ft_517 tinytext NULL

    I suspect we are running into MySQL row length limits (as we do have just over 500 fields and some of those are FFM fields) - but am frustrated trying to find tools to debug and confirm that.

    I found a “SHOW TABLE STATUS” command to return information about the tables in question - but it’s returning 0 for “max_data_length”.

    I’m admittedly a bit out of my league here.  Are there better tools to use to :

    A. Determine if I am indeed running into a MySQL limitation.
    B. Know what our maximum row length is
    C. Be able to determine the effects of any field/IA restructuring.

  • #2 / Apr 13, 2010 7:49pm

    Brandon Jones

    5500 posts

    Have you tried doing a repair or optimize on the table in question?

    Beyond that, those are good questions but not ones we can answer directly, as it can vary from host to host. Contact them and hopefully they can help diagnose the issue further.

    Keep us posted!

  • #3 / Apr 13, 2010 8:51pm

    Boyink!

    5011 posts

    No - I haven’t done anything yet as I wanted to leave it in error state until further notice.

    While I understand the answers may be different host to host (but would they be if this was a MySQL limit?), I was hoping for some direction on if there were better ways to return the current and maximum sizes from MySQL.

  • #4 / Apr 14, 2010 1:59am

    John Henry Donovan

    12339 posts

    Mike,

    There is actually a limit of 4096 columns per table but every table has a maximum row size of 65,535 bytes. So basically the total width of all these columns cannot exceed this size.

    This info is from this MySQL article but I am unsure if your host may have further restricted this.

    If you look in a tool like phpMyAdmin what is the table size for exp_weblog_data at the moment? Would it be close to 65,535 bytes?

  • #5 / Apr 14, 2010 8:21am

    Boyink!

    5011 posts

    Thanks John Henry - I don’t have access to the db at that level so am asking the people who do…;)

  • #6 / Apr 14, 2010 9:09am

    Sue Crocker

    26054 posts

    Let us know what you find out, We’ll be here.

  • #7 / Apr 14, 2010 12:07pm

    Boyink!

    5011 posts

    64796 exp_weblog_data.frm
    589824 exp_weblog_data.ibd

    I take it the “frm” is the row size and the limitation we’re running into?

  • #8 / Apr 14, 2010 5:39pm

    Ingmar

    29245 posts

    Error Number: 1005
    Description: Can’t create table ‘./ee/#sql-d5b_45917.frm’ (errno: 139)

    I can confirm that errno: 139 refers to “Too big row”.

    Apart from that you’d probably need somebody well versed in the ways of MySQL…

  • #9 / Apr 14, 2010 6:57pm

    Mark Bowen

    12637 posts

    I’d perhaps suggest getting in touch with Mitchell at Solspace as I know that they offer an evaluation service for servers and although I’ve never used them for that I can definitely attest to them knowing their stuff 😉

    Best wishes,

    Mark

  • #10 / Apr 14, 2010 8:34pm

    Brandon Jones

    5500 posts

    Let us know how this turns out, Boyink!

  • #11 / Apr 15, 2010 11:38am

    Boyink!

    5011 posts

    Help me understand here…I came across this post from DJones indicating that EE should be good for ~ 2000 custom fields, yet we’re bumping into this issue at around 500 (like the original poster in that thread).

    We’ve not added date fields.

  • #12 / Apr 15, 2010 11:49am

    ender

    1644 posts

    if you look at the exp_weblog_data table schema, are there any fields other than entry_id, site_id, and weblog_id that aren’t of type text or tinytext?  char/varchar/date-type fields contribute more to the row length limit than text and blob fields do.

    if you’re on 1.6.8, you might try to reuse some custom fields via the gypsy extension

  • #13 / Apr 15, 2010 11:54am

    Boyink!

    5011 posts

    I just had them run me that schema - all fields are text or tinytext.

    I’m reluctant to add Gypsy to the mix quite yet - this is already a pretty complex EE MSM install and I noted that Brandon isn’t going to continue to develop Gypsy.

  • #14 / Apr 15, 2010 12:01pm

    ender

    1644 posts

    another way you might consolidate is by moving groups of fields into a FF matrix field (limited to a single row).  you probably won’t want to move any fields to the matrix that you need to use the weblog:entries search parameter on though, for performance reasons.  don’t want to have to deserialize the field to find matching rows because the deserialization can only happen in PHP.  even a query on a non-indexed field that forces a full table scan will outperform PHP.

  • #15 / Apr 15, 2010 12:10pm

    Boyink!

    5011 posts

    We’re using FFM already - and actually it’s partially to blame for the number of fields that we have.

    FFM isn’t fully MSM compatible. I can’t re-use fields across MSM sites and then pull site-specific content - so even though the site would allow shared field groups I have to create site-specific ones.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases