XF 1.4 Fatal Error memory exhausted when trying to edit preview_tooltip template

Joe Link

Well-known member
I'm trying to remove a line from the preview_tooltip template, which is causing two errors. This server has 32GB of RAM. The host tried setting the php memory limit to unlimited, as well as restarting the LiteSpeed server. Neither of these worked. I seem to be able to edit other templates just fine.

First error, always:

Code:
Error Info
ErrorException: Fatal Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 312783 bytes) - library/Zend/Db/Statement/Mysqli.php:208
Generated By: Joe Link, 5 minutes ago
Stack Trace

#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}

Request State

array(3) {
  ["url"] => string(73) "https://www.domain.com/xf/admin.php?templates/save-multiple.json"
  ["_GET"] => array(1) {
    ["templates/save-multiple_json"] => string(0) ""
  }
  ["_POST"] => array(13) {
    ["titleArray"] => array(1) {
      [310] => string(15) "preview_tooltip"
    }
    ["styleidArray"] => array(1) {
      [310] => string(1) "0"
    }
    ["templateArray"] => array(1) {
      [310] => string(0) ""
    }
    ["addon_id"] => string(7) "XenForo"
    ["style_id"] => string(2) "32"
    ["template_id"] => string(3) "310"
    ["title_original"] => string(15) "preview_tooltip"
    ["_xfToken"] => string(8) "********"
    ["includeTitles"] => array(2) {
      [0] => string(15) "preview_tooltip"
      [1] => string(15) "preview_tooltip"
    }
    ["_TemplateEditorAjax"] => string(1) "1"
    ["_xfRequestUri"] => string(63) "/xf/admin.php?templates/preview_tooltip.310/edit&style_id=32"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}

Second error, sometimes:

Code:
Error Info
ErrorException: Fatal Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 312012 bytes) - library/XenForo/Template/Compiler/Statement/Raw.php:17
Generated By: Joe Link, 14 minutes ago
Stack Trace

#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}

Request State

array(3) {
  ["url"] => string(73) "https://www.domain.com/xf/admin.php?templates/save-multiple.json"
  ["_GET"] => array(1) {
    ["templates/save-multiple_json"] => string(0) ""
  }
  ["_POST"] => array(13) {
    ["titleArray"] => array(1) {
      [310] => string(15) "preview_tooltip"
    }
    ["styleidArray"] => array(1) {
      [310] => string(1) "0"
    }
    ["templateArray"] => array(1) {
      [310] => string(0) ""
    }
    ["addon_id"] => string(7) "XenForo"
    ["style_id"] => string(2) "35"
    ["template_id"] => string(3) "310"
    ["title_original"] => string(15) "preview_tooltip"
    ["_xfToken"] => string(8) "********"
    ["includeTitles"] => array(2) {
      [0] => string(15) "preview_tooltip"
      [1] => string(15) "preview_tooltip"
    }
    ["_TemplateEditorAjax"] => string(1) "1"
    ["_xfRequestUri"] => string(63) "/xf/admin.php?templates/preview_tooltip.310/edit&style_id=35"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
How many styles do you have and how many of them are children of the style you are editing the template in?

@Brogan 8 styles total, since this is my dev install.

Default Style
Style 2.0
--- Style 2.0 Test
Framework Style
--- Master Style
------ Style 3.0 #1
--------- Style 3.0 Test
------ Style 3.0 #2


@Joe Link your server is configured to only allow php to use at most ~64mb. The minimum required for XenForo is 128mb and recommended is 256mb.

@Xon Good to know. Since this server has 32GB RAM, is there any benefit to setting this above 256MB? I'll modify this and see if it changes.
 
Set the memory_limit to 128M if you haven't already. Also, if you're running debug mode, you can try disabling this; it potentially uses a lot of memory if there are a large number of queries.

Which style are you editing in? The framework style?

Further, how many languages do you have installed? That can be as relevant as the number of styles.
 
Top Bottom