• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Fatal Error On Certain Thread Pages

Divvens

Well-known member
#1
This popped up for the first time today, when you visit certain pages (currently, only two on a particular thread) a fatal error pops up. Error log shows this;

PHP:
Server Error Log
Error Info
ErrorException: Fatal Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 65552 bytes) -library/XenForo/BbCode/Formatter/Base.php:1896
Generated By: Divvens, A moment ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(87) "http://orojackson.com/threads/the-shadow-realm-where-the-devil-rules-v-3.15688/page-637"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
What could be the reason for this?
 

Brogan

XenForo moderator
Staff member
#2
It's complaining of running out of memory while trying to render the page.

Do you have a significant amount of bb code on that page?
 

Divvens

Well-known member
#3
It's complaining of running out of memory while trying to render the page.

Do you have a significant amount of bb code on that page?
I'm not sure, but there could be lots of emoticons (users practically spammed emoticons on those 2 pages), could that be the reason?
 

Brogan

XenForo moderator
Staff member
#4
It's possible.

I get errors attempting to load pages 637 and 638 - pages either side of those appear to be OK.

You can try increasing the available memory to see if you can get the pages to render.
Then it may be worth editing the posts and reducing the amount of smilies.
 

Divvens

Well-known member
#5
It's possible.

I get errors attempting to load pages 637 and 638 - pages either side of those appear to be OK.

You can try increasing the available memory to see if you can get the pages to render.
Then it may be worth editing the posts and reducing the amount of smilies.
Line 1896 on that php document is indeed;
PHP:
 $text = strtr($text, $this->_smilieTranslate);
I'm not aware where I should increase the available memory, is it to MySQL as a whole? Or to a particular module?
 

Brogan

XenForo moderator
Staff member
#8
Yes, it can be ignored as it will only throw that error when someone attempts to load those pages.

You could edit the database directly but you would have to locate the specific posts.
The last post on page 636 is 1053997 and the first post on page 639 is 1056499 - so that gives you the range of post IDs and then you just need to run a query to grab those posts for that thread.
Code:
SELECT * FROM `xf_post` WHERE thread_id = 15688 AND post_id > 1053997 AND post_id < 1056499
 

Divvens

Well-known member
#9
Thanks for all the help @Brogan, I spotted the posts searching the thread ID, took a longer time but I had started before your post! :D

It seemed to have been three posts with approximately 150 images (gifs) in total using the IMG bbcode. I'll limit the max images per post to 20 or something (had it set to 50).

Thanks again Brogan!