The issue
Hi! I want to preface this by saying that I'm very new to all of this. I don't really know what I'm doing that well, but my community has suddenly found itself in need of a place to talk besides just Discord, so I'm doing my best to learn on the fly 😅 Forgive me if I'm missing very obvious information, I'll be happy to learn whatever I'm missing if you give me the keywords to search it by.
I managed to get through the basic installation of the software and things were going well, but then we went through the list of extensions and picked out several that we thought would be vital to what we're trying to make. We tested each one as we went to verify that they worked, did what we wanted, and that they wouldn't break anything. But when I installed the extension FoF Night Mode, I got a 500 internal server error after I enabled it. As soon as I reloaded the page, everything was fine and the extension worked, so I shrugged it off... but then I kept getting frequent 500 errors as I continued to set things up.
It seems like whenever the FoF Night Mode extension is enabled, these 500 errors happen a lot. They seem to happen most often whenever I turn an extension on or off, but they also happen outside of the admin panel occasionally too.
I tried disabling FoF Night Mode, and this mostly solved the problem. I can now turn other extensions on and off and usually I won't get an error. But every once in a while I still get one, so it can't be the FoF Night Mode extension alone.
I had a look at the error log, and each time there is an error it outputs this:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8388608 bytes) in /home/ukagakad/flarum/storage/less/lessphp_kzv3b2zw7n4os8sgg8s0wkgc0cw44co.lesscache on line 3
(The number of bytes and the file path are always exactly the same)
I tried looking at the file in question to see if I could spot a problem, but... this doesn't seem to be a human manageable file, as it's all crammed onto one line 😅
Looking back at my chatlog with my fellow moderator last night, it looks like the last few extensions I installed before I started seeing the problems were:
- FoF Best Answer
- FoF User Bio
- Post Bookmarks
- FoF Night Mode
(I can probably go through and get the exact order I installed almost everything in, if more are needed...)
I've tried toggling all of these extensions off, and the errors still persist. If I have to, I can try toggling off every extension and re-enabling them one by one to see which one causes the problem, but... the error occurs at seemingly random times, so I thought I'd come and see if there is something simple I've missed before I subject myself to that madness 😅 or perhaps learn if there's a better starting point for debugging this issue! I tried searching for answers and couldn't find anything with the search terms I used, so I'm not really sure how else to debug this other than toggling extensions and hoping for the best. I haven't worked with .LESS before, and my knowledge of PHP is... not much lol
Flarum information
Flarum core: 1.8.10
PHP version: 8.4.10
MySQL version: 5.7.44-cll-lve
Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, json, filter, ftp, gettext, hash, iconv, SPL, pcntl, random, readline, Reflection, session, standard, mbstring, shmop, SimpleXML, tokenizer, xml, i360, bcmath, dba, dom, enchant, fileinfo, gd, gmp, igbinary, imagick, intl, ldap, exif, memcached, msgpack, mysqlnd, mysqli, odbc, PDO, pdo_mysql, PDO_ODBC, pdo_sqlite, Phar, posix, redis, snmp, soap, sockets, sysvmsg, sysvsem, sysvshm, tidy, xmlreader, xmlrpc, xmlwriter, xsl, zip
+---------------------------------+---------+--------+
| Flarum Extensions | | |
+---------------------------------+---------+--------+
| ID | Version | Commit |
+---------------------------------+---------+--------+
| flarum-flags | v1.8.2 | |
| flarum-tags | v1.8.4 | |
| flarum-approval | v1.8.2 | |
| flarum-mentions | v1.8.5 | |
| flarum-subscriptions | v1.8.1 | |
| flarum-suspend | v1.8.4 | |
| fof-follow-tags | 1.2.9 | |
| the-turk-diff | 1.1.2 | |
| nearata-twofactor | v2.2.1 | |
| nearata-signup-confirm-password | v3.1.1 | |
| nearata-copy-code-to-clipboard | v2.2.0 | |
| ianm-syndication | 1.3.4 | |
| gtdxyz-badges | 1.0.1 | |
| foskym-pagination | v0.3.0 | |
| fof-user-bio | 1.4.2 | |
| fof-links | 1.3.0 | |
| fof-ignore-users | 1.2.1 | |
| fof-disposable-emails | 1.0.0 | |
| fof-cookie-consent | 1.1.3 | |
| fof-best-answer | 1.6.4 | |
| fof-ban-ips | 1.1.2 | |
| flarum-sticky | v1.8.2 | |
| flarum-statistics | v1.8.1 | |
| flarum-nicknames | v1.8.2 | |
| flarum-markdown | v1.8.1 | |
| flarum-lock | v1.8.2 | |
| flarum-likes | v1.8.1 | |
| flarum-lang-japanese | v3.9.1 | |
| flarum-lang-english | v1.8.0 | |
| flarum-emoji | v1.8.1 | |
| flarum-bbcode | v1.8.0 | |
| clarkwinkelmann-post-bookmarks | 1.0.0 | |
| clarkwinkelmann-emojionearea | 1.1.1 | |
+---------------------------------+---------+--------+
Base URL: https://ukagakadreamteam.com/forum
Installation path: /home/ukagakad/flarum
Queue driver: sync
Session driver: file
Scheduler status: Never run
Mail driver: mail
Debug mode: off