XF 2.2 ErrorException: Fatal Error: Allowed memory size

chrisf

Member
Hi, I have a test site up and running to plan out our migration from 1.5.24 to 2.2.3. The test migration worked perfectly and I am mostly down to cosmetic changes left on my todo list. The only problem I am running into is the server is having errors. I see a bunch of folks having the same type problems but no real resolution to them. In XF admin I see this...

1614102152746.webp

in the apache error.log I see
[Tue Feb 23 09:32:31.441670 2021] [:error] [pid 29599] [client x.y.z.z:25883] FastCGI: server "/var/www/web/cgi-bin/php-fcgi-a.b.c.d-443-a.b.org" stderr: PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 118784 bytes) in /var/www/web/web/community/src/XF/Db/Mysqli/Statement.php on line 125, referer: https://a.b.org/community/index.php

Do I really need to give the application more than 128mb of memory for this? The forums have about 12k members and 200k posts. Any pointers is appreciated.
 
After upgrading to 2.2 I'm getting the same error a few times per week, usually via Language.php and that's with 1024M set for PHP memory_limit.
Code:
[LIST]
[*]ErrorException: Fatal Error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes)
[*]src/XF/Language.php:126
[*]Generated by: Unknown account
[*]Apr 22, 2021 at 11:00 PM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 [internal function]: XF::handleFatalError()
#1 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(71) "https://www.website.com/search/26707/?q=Restomod+get+1997&o=relevance"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Code:
[LIST]
[*]ErrorException: Fatal Error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes)
[*]src/XF/Language.php:126
[*]Generated by: Unknown account
[*]Apr 22, 2021 at 8:00 AM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 [internal function]: XF::handleFatalError()
#1 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(72) "https://www.website.com/threads/automatic-transmission-question.38473/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
[URL='https://www.website.com/admin.php?logs/server-errors/10/delete'][[/URL]/code]
I have two XF2.2 sites running on the server and the other one, which is smaller, doesn't get these errors. Both are running all the same extensions and theme. The main difference on the site that is getting the error (besides it getting 4 times the traffic) is that we were using Threadloom search before the upgrade and are now using XF ES search with ElasticSearch. I'm wondering if that's putting too much load on the server. We turned to Threadloom years ago because ElasticSearch was crashing constantly. We've updated ES and optimized it at the same time of upgrading XF in hopes that it wouldn't have issues this time around.
 
Top Bottom