Child pages
  • [debugger] Debugger Options and Memory Usage
Skip to end of metadata
Go to start of metadata

Imported From: http://groups.google.com/group/in-portal-bugs/browse_thread/thread/55054c2742eda579#

I'm on v5.1.0, and I'm using debugger.

I came to this in source code on a partially loaded home page:

<b>Fatal error</b>:  Allowed memory size of 52428800 bytes exhausted (tried to allocate 146 bytes) in <b>.../core/kernel/utility/debugger.php</b> on line <b>678</b> 

Should I worry?

Related Tasks

INP-662 - Getting issue details... STATUS

18 Comments

  1. Interesting. What the template it is? Is it always happening on that
    template or sometimes?

  2. It was using advanced v1.1.0 theme, under v510.
    I had this occuring only once, and I was loading debug toolbar.
    I was refreshing the theme many times to see changes while modifying CSS

    I've deactivated toolbar, I'll let you know if it happens again.

    2010/8/7 Alexander Obuhovich <aik.b...@gmail.com>

  3. when we use debug mode and we refresh pages all day long for design
    dev purpose, we end up with a blank page.

    [client 82.251.90.16] PHP Fatal error:  Allowed memory size of
    52428800 bytes exhausted (tried to allocate 4677721 bytes) in /var/www/
    vhosts/guideduvignoble.fr/httpdocs/core/kernel/utility/debugger.php on
    line 675

  4. Any specific page or each time different page?

  5. we were working only on index page

    2010/8/11 Alexander Obuhovich <aik.b...@gmail.com>

  6. Good news for you. I've been able to isolate and fix that problem on you
    server. Situation was as follows:

       - you got 4 enable themes (only one is actually used) and therefore one
       category is created for each template + your manually added categories =
       1500 categories
       - you use PHP4, which doesn't handle "passing data by reference" normally

    On menu display stage attempt was build to scan all categories and create
    menu and then put it to cache. That putting part failed, because same line
    of code was acting differently on PHP4 and PHP5.

    I've noticed that only, while debugging your database.

    I've already applied fix that vineyard site of yours. Here is the patch if
    you ever need to use it on other 5.1.0 installations. Confirmed, that there
    was no such problem on 5.0.4 version.

    I'll recommend to disable themes that are not in use and delete sections
    (with red folder icon), that are associated with them.

    Task:

    INP-662 - Getting issue details... STATUS


    Ready for testing.

    Phil, you could just continue developing that site and if for sometime you
    won't see that problem, then you can mark mentioned above task as tested.

  7. I also propose to store menu cache for each theme separately, so it won't be
    taking too long to build it in first place, event if someone will have 10
    themes enabled at the same time.

  8. thanks for fixing.

    Isolating theme is a good idea, because along with site domain
    function, we are likely to have many themes...

    2010/8/14 Alexander Obuhovich <aik.b...@gmail.com>:

  9. I've also improved menu cache building scheme. Now when you have 1500
    categories, then it performs once database query instead of 1500 queries to
    get children of each category.

  10. Alex,

    I have again  PHP Fatal error:  Allowed memory size of 52428800 bytes
    exhausted (tried to allocate 3261092 bytes) in [GDV] on line 432

    Any idea?
    thanks

  11. other info:

    Fatal Error: Got a packet bigger than 'max_allowed_packet' bytes
    (1153) [REPLACE INTO `Cache` (`VarName`,`Data`,`Cached`,`LifeTime`)
    VALUES ('cms_menu','a:48:{s:2:\"c2\";a:27:{s:10:\"CategoryId\";s:
    1:\"2\";s:6:\"ItemId\";s:2:\"c2\";s:12:\"ItemPriority\";s:2:\"-1\";s:
    11:\"l1_ItemName\";s:22:\"Discover the vineyards\";s:11:\"l2_ItemName
    \";s:24:\"D

  12. Related to "other info" you have 1MB max query size in your MySQL server.
    Since you like to copy-paste "advanced" theme clones, that create a lot
    categories, then all menus from all themes combined can be more then 1MB in
    serialized format.

    I recommend to raise "max_allowed_packet" variable in "my.cnf" file to at
    least 32MB (see proper format in MySQL documentation).

    Related to eaten memory "on line 432" isn't enough, filename, where that 432
    line is will be useful too.
    Also is that problem reproducible on any particular page or it is "index" as
    before?

  13. I have 3 themes actually, and I hope the system could handle really
    more, being able to use site domain without any worry.
    The error happens everytime I activate debug now, then I'll put a
    higher value as you propose.

    I've noticed that serialized menu take a lot of place in memory
    because it takes all themes AND all languages at the same time, is it
    really necessary?

    2010/10/1 Alexander Obuhovich <aik.b...@gmail.com>:

  14. Hi Phil,

    Yes, system can definitely handle more than 3 themes and multiple
    languages, but there some custom tuning might be required to have it
    all working with more then 5 Languages.

    To sum up all together and better address your case, please indicate:

    1. How many total and active Themes and Languages you have?
    2. How many Records are in your Categories table in you do browse via
    phpMyAdmin?

    Thanks.

    DA.

  15. Phil has ~ 2000 categories, 4 themes, 10 languages.

    That all combined results "cms_menu" cache variable, that holds cached
    Front-end menu to became ~1MB in serialized form. Because of MySQL
    configuration variable "max_allowed_packet" size (on Phil's server) is set
    to 1MB, then that SQL saving that cache fails every time it tries to did
    that.

    I'm recommending to increase that MySQL configuration variable to 32MB and
    to check for such a problem before In-Portal installation is made.

  16. thanks for answering Alex.

    About checking at install stage, I'd recommend to use it as a warning, as
    I'm not sure we can modify this value from vhosts httpdconf file.

    I'm changed this value on the server, restarted MySQL, but the error still
    occurs, when I try to clear template cache for example...

    Here is my actual configuration:
    key_buffer = 512M
    max_allowed_packet = 64M
    table_cache = 512
    sort_buffer_size = 2M
    read_buffer_size = 2M
    read_rnd_buffer_size = 4M
    myisam_sort_buffer_size = 32M
    query_cache_size = 32M
    max_connections = 350

    By the way, shoud I worry about the last line, as a limit for simultaneous
    users serving at a correct speed?

    2010/10/4 Alexander Obuhovich <aik.b...@gmail.com>

  17. *Here is my actual configuration:*

    I don't know much about configuring servers, only parts that prevents
    In-Portal from working normally ;)

    *I'm changed this value on the server, restarted MySQL, but the error still
    occurs, when I try to clear template cache for example...*

    Still occurs (see other mail about T_DOC_COMMENT constant). I've enabled
    debug mode and performed "Clear Template Cache" and visited front-end. I've
    also tried to clear menu cache and then visited front-end.

  18. 2010/10/4 Alexander Obuhovich <aik.b...@gmail.com>