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.

Fatal error / mysql_result.php on line 162

January 06, 2011 5:41pm

Subscribe [4]
  • #1 / Jan 06, 2011 5:41pm

    Ditchmonkey

    53 posts

    Note: Split off from here.


    I’m also having this problem. I have 2 EE2 installations on my server and this is what I’m experiencing:

    1. Installation #1 on 2.1.0 with just a few hundred records works fine

    2. Installation #2 on 2.1.3 has the same problem as specified by the original poster on the channel that contains over 10,000 records. (worked fine until recently on EE1)

    3. Installation #2 works fine on channels that have a few records.

    4. Installation #2 is very slow on the front end on pages that access the channel with over 10,000 records.

    Seems that this is an issue with EE2 (regardless of version) with channels that have a lot of data. Increasing the PHP memory limit is a bandaid that could cause server problems during times of high traffic. I’d rather get to the bottom of the actual issue. Any insights?

  • #2 / Jan 07, 2011 9:59am

    Ingmar

    29245 posts

    I split off your thread into a thread of its own as the original one was becoming rather convoluted. What message, exactly, are you getting? Where & when?

  • #3 / Jan 07, 2011 1:18pm

    Ditchmonkey

    53 posts

    The original intent was to add information to that other thread because it had been going on for a month with no resolution.

    Moving forward the error message I get when i try to modify a record (edit entry) is

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 51 bytes) in /home/camping/public_html/2011/stm9397/codeigniter/system/database/drivers/mysql/mysql_result.php on line 162

  • #4 / Jan 08, 2011 3:03pm

    Greg Salt

    3988 posts

    Hi Ditchmonkey,

    You only have 64MB of memory assigned to PHP. I say “only” because although it is an amount that should be enough for most situations much depends on how your system is set up. How many categories and custom fields are assigned to the channel with this entry?

    Cheers

    Greg

  • #5 / Jan 08, 2011 3:32pm

    Ditchmonkey

    53 posts

    There are a lot of fields - at least 20 and 2 categories.

    However it worked fine on EE 1. And I’m running a forum and integrated CMS that run much more complicated queries on the same server and never a problem with that. There is no reason this script should need more than 64mb of memory and throwing resources at the issue is only masking the problem, not fixing it.

    Is there a recommended mysql version? I’m running 5.0.91 community.

  • #6 / Jan 09, 2011 12:30am

    Lisa Wess

    20502 posts

    Hi, Ditchmonkey -

    Looking at the thread this was reported in iniitally, that user has some version mismatching.  Can you double check that on yours?  Quotes from Brandon’s response in that thread:

    I notice that your MySQL database version is 4.1.22-standard-log (shown in Tools > Data > SQL Manager) and your MySQL client version is 5.0.77 (shown in Tools > Utilities > PHP Info).

    If those mismatch, the first step would be to talk to your host about making them match.  EE’s minimum MySQL requirement is 4.1.  You might double check that the [url=http://exprressionengine.com/overview/requirements]Server Check Wizard] reports all items meeting those minimum requirements.

    If none of that gives any hint to where the issue may be, please list off any third-party add-ons that you may be running.  The original poster did increase his memory and the error indicated more memory and still ran out - are you seeing that same symptom? Always using a bit more memory than available?  Lastly, is this happening on new entries or just editing older ones?

  • #7 / Jan 09, 2011 1:19pm

    Ditchmonkey

    53 posts

    Result of mysql version test:

    In ” Tools >  Data > SQL Manager” we have “Database Version = 5.0.91-community”
    and in “Tools > Utilities > PHP Info” it shows “Client API version = 5.0.91 “

    The problem occurs both when adding or editing records.

    I have disabled all modules and the result is the same.

    I have not increased the PHP memory limit because the problem is not a lack of memory - it is the amount of memory the script is using. Increasing the memory limit will only serve to mask the problem and a memory problem could bring my server to its knees at times of high traffic.

  • #8 / Jan 09, 2011 3:37pm

    Lisa Wess

    20502 posts

    Hi, Ditchmonkey -

    Ok, no mismatch, good.

    I agree that, on the surface, it doesn’t look like you should need more memory.  However, the symptom the other thread saw was very specific - no matter how much memory he allocated, adding an entry always used a few bytes more.  Would you be willing to string along and increase your memory just temporarily to 128, try adding/editing an entry, and see if that happens to you too?

    Such a large jump would really rule out any other confusion as well.  You can drop the memory down again after you get the results.

    Now you said you have about 20 custom fields?  That’s really not many.  What types of custom fields are these?  Is your site relationship-heavy?  And knowing what add-ons you have is definitely important to troubleshooting this.  Specifically custom field types, extensions, and any modules or accessories that impact the publish page.

    Thank you!

  • #9 / Jan 09, 2011 8:32pm

    Ditchmonkey

    53 posts

    I was talking to my developer and he informed me we actually have 31 fields per record which break down like this:

    3 of type date
    1 relationship
    8 dropdowns
    17 text inputs
    2 textareas

    we are using just 1 relationship custom field + 2 category groups.

    We are using various custom and commercial modules on the live site however at this time all modules have been removed and the error in the admin has not changed.

    Working on getting the mem limit increased.

  • #10 / Jan 10, 2011 9:51am

    Sue Crocker

    26054 posts

    Hi, Ditchmonkey. I replied to another thread of yours.. just adding the same info to this thread.

    EEWiki:// HowTo Override Memory Limitations

    Let us know when you’ve had a chance to get this put into place, or you may need an assist from your host.

  • #11 / Jan 10, 2011 9:47pm

    Ditchmonkey

    53 posts

    Setting the php memory limit to 128mb seems to have eliminated the error. However, obviously this script needing 128mb to execute is completely unacceptable and I’d still like to resolve the issue.

  • #12 / Jan 11, 2011 9:54am

    Sue Crocker

    26054 posts

    128 works, but what happens if you back it down to 99M? I don’t know what’s causing the need for additional memory, but are any of those custom fields third party ones?

  • #13 / Jan 28, 2011 1:36pm

    Lisa Wess

    20502 posts

    Hi, Ditchmonkey -

    Just wanted to follow up and see how this is going for you.  Did you try Sue’s recommendation?

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

ExpressionEngine News!

#eecms, #events, #releases