The issue
My flarum site is very very slow .... I have a VPS having 6 Cores and 12GB RAM, I have around - USERS - 99.5K || DISCUSSIONS - 9.9K | POSTS - 79.1K
I don't know why it is so slow .... Please help to make it fast.
/storage/logs
[2023-09-22 00:49:58] flarum.ERROR: Exception: Unable to create lockable file: /home/hacksnat/public_html/storage/cache/ee/18/ee18c19a9c48a86a85d7083b122370695643cb8c. Please ensure you have permission to create files in this location. in /home/hacksnat/public_html/vendor/illuminate/filesystem/LockableFile.php:73
Stack trace:
#0 /home/hacksnat/public_html/vendor/illuminate/filesystem/LockableFile.php(43): Illuminate\Filesystem\LockableFile->createResource('/home/hacksnat/...', 'c+')
#1 /home/hacksnat/public_html/vendor/illuminate/cache/FileStore.php(101): Illuminate\Filesystem\LockableFile->__construct('/home/hacksnat/...', 'c+')
#2 /home/hacksnat/public_html/vendor/illuminate/cache/Repository.php(315): Illuminate\Cache\FileStore->add('fof-geoip.retri...', true, 3600)
#3 /home/hacksnat/public_html/vendor/fof/geoip/src/Jobs/RetrieveIP.php(45): Illuminate\Cache\Repository->add('fof-geoip.retri...', true, 3600)
#4 /home/hacksnat/public_html/vendor/illuminate/container/BoundMethod.php(36): FoF\GeoIP\Jobs\RetrieveIP->handle(Object(FoF\GeoIP\Api\GeoIP), Object(Illuminate\Cache\Repository))
#5 /home/hacksnat/public_html/vendor/illuminate/container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#6 /home/hacksnat/public_html/vendor/illuminate/container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#7 /home/hacksnat/public_html/vendor/illuminate/container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Container\Container), Array, Object(Closure))
#8 /home/hacksnat/public_html/vendor/illuminate/container/Container.php(653): Illuminate\Container\BoundMethod::call(Object(Illuminate\Container\Container), Array, Array, NULL)
#9 /home/hacksnat/public_html/vendor/illuminate/bus/Dispatcher.php(128): Illuminate\Container\Container->call(Array)
#10 /home/hacksnat/public_html/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(FoF\GeoIP\Jobs\RetrieveIP))
#11 /home/hacksnat/public_html/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(FoF\GeoIP\Jobs\RetrieveIP))
#12 /home/hacksnat/public_html/vendor/illuminate/bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#13 /home/hacksnat/public_html/vendor/illuminate/queue/CallQueuedHandler.php(120): Illuminate\Bus\Dispatcher->dispatchNow(Object(FoF\GeoIP\Jobs\RetrieveIP), false)
#14 /home/hacksnat/public_html/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(FoF\GeoIP\Jobs\RetrieveIP))
#15 /home/hacksnat/public_html/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(FoF\GeoIP\Jobs\RetrieveIP))
#16 /home/hacksnat/public_html/vendor/illuminate/queue/CallQueuedHandler.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#17 /home/hacksnat/public_html/vendor/illuminate/queue/CallQueuedHandler.php(70): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\SyncJob), Object(FoF\GeoIP\Jobs\RetrieveIP))
#18 /home/hacksnat/public_html/vendor/illuminate/queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\SyncJob), Array)
#19 /home/hacksnat/public_html/vendor/illuminate/queue/SyncQueue.php(43): Illuminate\Queue\Jobs\Job->fire()
#20 /home/hacksnat/public_html/vendor/fof/geoip/src/Repositories/GeoIPRepository.php(56): Illuminate\Queue\SyncQueue->push(Object(FoF\GeoIP\Jobs\RetrieveIP))
#21 /home/hacksnat/public_html/vendor/fof/geoip/extend.php(37): FoF\GeoIP\Repositories\GeoIPRepository->retrieveForPost(Object(Flarum\Post\CommentPost))
#22 [internal function]: Flarum\Extension\Extension->FoF\GeoIP\{closure}(Object(FoF\GeoIP\IPInfo), Object(Flarum\Post\CommentPost))
#23 /home/hacksnat/public_html/vendor/illuminate/database/Eloquent/Relations/Concerns/SupportsDefaultModels.php(54): call_user_func(Object(Closure), Object(FoF\GeoIP\IPInfo), Object(Flarum\Post\CommentPost))
#24 /home/hacksnat/public_html/vendor/illuminate/database/Eloquent/Relations/HasOne.php(42): Illuminate\Database\Eloquent\Relations\HasOne->getDefaultFor(Object(Flarum\Post\CommentPost))
#25 /home/hacksnat/public_html/vendor/illuminate/database/Eloquent/Builder.php(672): Illuminate\Database\Eloquent\Relations\HasOne->initRelation(Array, 'ip_info')
#26 /home/hacksnat/public_html/vendor/illuminate/database/Eloquent/Builder.php(642): Illuminate\Database\Eloquent\Builder->eagerLoadRelation(Array, 'ip_info', Object(Closure))
#27 /home/hacksnat/public_html/vendor/illuminate/database/Eloquent/Collection.php(60): Illuminate\Database\Eloquent\Builder->eagerLoadRelations(Array)
#28 /home/hacksnat/public_html/vendor/illuminate/database/Eloquent/Collection.php(231): Illuminate\Database\Eloquent\Collection->load(Array)
#29 /home/hacksnat/public_html/vendor/illuminate/database/Eloquent/Collection.php(206): Illuminate\Database\Eloquent\Collection->loadMissingRelation(Object(Flarum\Database\Eloquent\Collection), Array)
#30 /home/hacksnat/public_html/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(250): Illuminate\Database\Eloquent\Collection->loadMissing(Array)
#31 /home/hacksnat/public_html/vendor/flarum/core/src/Api/Controller/ListPostsController.php(111): Flarum\Api\Controller\AbstractSerializeController->loadRelations(Object(Flarum\Database\Eloquent\Collection), Array, Object(Laminas\Diactoros\ServerRequest))
#32 /home/hacksnat/public_html/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(116): Flarum\Api\Controller\ListPostsController->data(Object(Laminas\Diactoros\ServerRequest), Object(Tobscure\JsonApi\Document))
#33 /home/hacksnat/public_html/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Api\Controller\AbstractSerializeController->handle(Object(Laminas\Diactoros\ServerRequest))
#34 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}(Object(Laminas\Diactoros\ServerRequest), Array)
#35 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ExecuteRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Closure))
#36 /home/hacksnat/public_html/vendor/acpl/flarum-lscache/src/Abstract/PurgeMiddleware.php(28): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#37 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): ACPL\FlarumCache\Abstract\PurgeMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#38 /home/hacksnat/public_html/vendor/acpl/flarum-lscache/src/Abstract/PurgeMiddleware.php(28): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#39 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): ACPL\FlarumCache\Abstract\PurgeMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#40 /home/hacksnat/public_html/vendor/acpl/flarum-lscache/src/Middleware/LSTagsMiddleware.php(16): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#41 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): ACPL\FlarumCache\Middleware\LSTagsMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#42 /home/hacksnat/public_html/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#43 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\ThrottleApi->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#44 /home/hacksnat/public_html/vendor/acpl/flarum-lscache/src/Middleware/LSCacheControlMiddleware.php(28): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#45 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): ACPL\FlarumCache\Middleware\LSCacheControlMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#46 /home/hacksnat/public_html/vendor/acpl/flarum-lscache/src/Middleware/VaryCookieMiddleware.php(35): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#47 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): ACPL\FlarumCache\Middleware\VaryCookieMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#48 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(36): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#49 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#50 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(69): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#51 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ResolveRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#52 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#53 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\SetLocale->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#54 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(58): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#55 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithHeader->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#56 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#57 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#58 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#59 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\RememberFromCookie->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#60 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#61 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\StartSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#62 /home/hacksnat/public_html/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#63 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\FakeHttpMethods->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#64 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#65 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ParseJsonBody->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#66 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#67 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\HandleErrors->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#68 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#69 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\InjectActorReference->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#70 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#71 /home/hacksnat/public_html/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#72 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\RequestHandler->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#73 /home/hacksnat/public_html/vendor/middlewares/base-path-router/src/BasePathRouter.php(101): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#74 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePathRouter->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#75 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#76 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Laminas\Stratigility\Middleware\OriginalMessages->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#77 /home/hacksnat/public_html/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#78 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePath->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#79 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#80 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ProcessIp->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#81 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#82 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(64): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\EmptyPipelineHandler))
#83 /home/hacksnat/public_html/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(73): Laminas\Stratigility\MiddlewarePipe->handle(Object(Laminas\Diactoros\ServerRequest))
#84 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#85 /home/hacksnat/public_html/index.php(26): Flarum\Http\Server->listen()
#86 {main}
Flarum information
Flarum core: 1.8.1
PHP version: 8.1.23
MySQL version: 10.3.39-MariaDB
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, readline, Reflection, SPL, session, standard, bcmath, bz2, calendar, ctype, curl, dba, dom, enchant, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, imap, intl, ldap, exif, mysqlnd, PDO, Phar, posix, shmop, SimpleXML, soap, sockets, sodium, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlwriter, xsl, zip, mysqli,pdo_mysql, pdo_sqlite, xmlreader, redis, ionCube Loader
+------------------------------------------+---------+--------+
| Flarum Extensions | | |
+------------------------------------------+---------+--------+
| ID | Version | Commit |
+------------------------------------------+---------+--------+
| flarum-flags | v1.8.0 | |
| flarum-suspend | v1.8.0 | |
| flarum-tags | v1.8.0 | |
| flarum-sticky | v1.8.0 | |
| flarum-likes | v1.8.0 | |
| flarum-nicknames | v1.8.0 | |
| flarum-approval | v1.8.0 | |
| fof-spamblock | 1.1.0 | |
| fof-user-directory | 1.2.3 | |
| michaelbelgium-discussion-views | v7.2.1 | |
| flarum-markdown | v1.8.0 | |
| afrux-forum-widgets-core | v0.1.7 | |
| v17development-user-badges | v1.1.0 | |
| v17development-seo | v1.8.0 | |
| the-turk-stickiest | 3.0.1 | |
| the-turk-diff | 1.1.2 | |
| sycho-profile-cover | v1.3.5 | |
| ramesh-dada-increase-title | 1.0.0 | |
| ramesh-dada-bbcode-alerts | 6.21 | |
| nearata-no-self-likes | v1.2.1 | |
| nearata-copy-code-to-clipboard | v2.2.0 | |
| migratetoflarum-canonical | 1.0.0 | |
| justoverclock-contactme | 0.2.3 | |
| ianm-no-meta-title | 1.1.0 | |
| ianm-html-head | 1.1.0 | |
| fof-username-request | 1.1.2 | |
| fof-user-bio | 1.2.2 | |
| fof-upload | 1.3.4 | |
| fof-terms | 1.2.1 | |
| fof-subscribed | 1.1.3 | |
| fof-stopforumspam | 1.2.3 | |
| fof-sitemap | 2.2.0 | |
| fof-share-social | 1.1.2 | |
| fof-polls | 2.1.1 | |
| fof-oauth | 1.4.4 | |
| fof-nightmode | 1.5.3 | |
| fof-links | 1.2.0 | |
| fof-impersonate | 1.1.1 | |
| fof-geoip | 1.2.0 | |
| fof-formatting | 1.0.3 | |
| fof-default-user-preferences | 1.2.0 | |
| fof-default-group | 1.1.1 | |
| fof-byobu | 1.3.2 | |
| fof-best-answer | 1.3.1 | |
| fof-bbcode-details | 1.1.1 | |
| fof-ban-ips | 1.0.3 | |
| fof-analytics | 1.1.0 | |
| flarumtr-mobile-search | v1.2 | |
| flarum-statistics | v1.8.0 | |
| flarum-pusher | v1.8.0 | |
| flarum-mentions | v1.8.2 | |
| flarum-lock | v1.8.0 | |
| flarum-lang-english | v1.8.0 | |
| flarum-bbcode | v1.8.0 | |
| extiverse-mercury | 0.2.0 | |
| davwheat-custom-sidenav-links | 1.0.1 | |
| davwheat-ads | 1.2.0 | |
| datlechin-traditional-rank-icons | v0.1.1 | |
| darkle-fancybox | 1.1.2 | |
| clarkwinkelmann-post-permissions | 1.0.0 | |
| clarkwinkelmann-popular-discussion-badge | 1.1.1 | |
| clarkwinkelmann-mass-actions | 1.1.2 | |
| clarkwinkelmann-emojionearea | 1.0.0 | |
| clarkwinkelmann-discussion-bookmarks | 2.0.0 | |
| clarkwinkelmann-author-change | 1.0.3 | |
| askvortsov-rich-text | v2.1.7 | |
| askvortsov-moderator-warnings | v0.6.2 | |
| askvortsov-markdown-tables | v1.2.1 | |
| afrux-news-widget | v0.1.1 | |
| acpl-lscache | v2.2.0 | |
+------------------------------------------+---------+--------+
Base URL: https://xyz.com
Installation path: /home/hacksnat/public_html
Queue driver: sync
Session driver: file
Scheduler status: Active
Mail driver: mail
Debug mode: off