XF 2.1 ErrorException: Fatal Error: Out of memory (allocated 35651584) (tried to allocate 4096 bytes)

ShikiSuen

Well-known member
I got these errors happening everytime I do mass modification to templates or something similar (i.e. replacing the Terms and Rules article content.)

My server is Vultr VPS which uses the cheapest plan. MySQL Ngram smallest length is 2 (for searching Chinese texts).
Database Table types are default, but the index table has NGRAM enabled. Also, all tables use utf8mb4_unicode_520_ci for maximum compatibility with both Chinese and Japanese languages.

-------------------
ErrorException: Fatal Error: Out of memory (allocated 35651584) (tried to allocate 4096 bytes) src/vendor/oyejorge/less.php/lib/Less/Parser.php:2720
Generated by anonymous account on 2020-01-08, 17:55

Stack Trace
Code:
#0 [internal function]: XF::handleFatalError()
#1 {main}

Request Status
Code:
array(4) {
  ["url"] => string(140) "/css.php?css=public%3Anormalize.css%2Cpublic%3Acore.less%2Cpublic%3Aapp.less&s=2&l=2&d=1578505854&k=ec3cbb23ab07faaa06e5e99b86e2a740ab5c0f8b"
  ["referrer"] => string(38) "https://puwu.pro/index.php?help/terms/"
  ["_GET"] => array(5) {
    ["css"] => string(53) "public:normalize.css,public:core.less,public:app.less"
    ["s"] => string(1) "2"
    ["l"] => string(1) "2"
    ["d"] => string(10) "1578505854"
    ["k"] => string(40) "ec3cbb23ab07faaa06e5e99b86e2a740ab5c0f8b"
  }
  ["_POST"] => array(0) {
  }
}
 
The minimum memory requirement is 128MB. You are running out of memory at ~32MB.

The XenForo requirements script (and installer!) really should check max memory and complain/warn if it is too low.
 
I guess I can make assumptions now.

After checking the process information of my VPS (Ubuntu 18 LTS), I found that mysqld (8.x) takes 52% of my server RAM when no masive data I/O happens with my forum. Maybe changes towards templates (including large-length HTML-typographed forum help articles written in the language file) can make mysqld uses up all RAM of my server.
 
My nginx PHP max memory setting is already 256MB.
35651584 bytes is ~34MB of memory, which indicates the php-fpm pool's max memory is lower than you expect by touching php.ini

Can you post your Server Environment Report from your AdminCP

For example:

View attachment 216294
The Server report doesn't include the max php memory :( , I've opened a bug report for that.
 
Last edited:
Out of memory is a different error to Memory limit exceeded. Out of memory means either your server has ran out of available memory, or a lower-level limit has been reached (such as the memory available to the php-fpm pool).
 
What are the errors?
  • ErrorException: Fatal Error: Out of memory (allocated 8388608) (tried to allocate 32768 bytes)
  • src/vendor/composer/ClassLoader.php:444
  • Tarafından: Orcunuz
  • 23 Nis 2020 19:53'de
Yığın izleme
#0 [internal function]: XF::handleFatalError()
#1 {main}
Durum isteği
array(4) {
["url"] => string(48) "/forum/dis-aksam-kaporta-boya.133/similarthreads"
["referrer"] => string(71) "https://www.mazdagaraj.com/forum/dis-aksam-kaporta-boya.133/post-thread"
["_GET"] => array(0) {
}
["_POST"] => array(2) {
["title"] => string(21) "Kaputtaki boya catlam"
["_xfToken"] => string(8) "********"
}
}
 
Might be an issue with a similar threads addon.
  • ErrorException: Fatal Error: Out of memory (allocated 25165824) (tried to allocate 294912 bytes)
  • src/vendor/emojione/emojione/lib/php/src/Ruleset.php:4399
  • Tarafından: Bilinmeyen hesap
  • 2 May 2020 01:36'de
Yığın izleme
#0 [internal function]: XF::handleFatalError()
#1 {main}
Durum isteği
array(4) {
["url"] => string(7) "/forum/"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}


I constantly get these errors for different reasons.
 
Back
Top Bottom