PHP slow.log
My Flarum is much slower after upgrading from 1.3 to 1.6. I'm on VPS with 4GB of RAM, and it's not due to high usage, it's the same even where there are no visitors online.
Since this morning my PHP slow.log have more than 6000 lines already. Some of errors are listed below:
Where do I go from here?
`
[15-Dec-2022 05:22:33] [pool flarum-forum] pid 16404
script_filename = public/index.php
[0x00007f7493617690] __construct() vendor/illuminate/database/Eloquent/Concerns/HasRelationships.php:750
[0x00007f7493617590] newRelatedInstance() vendor/illuminate/database/Eloquent/Concerns/HasRelationships.php:351
[0x00007f74936174e0] hasMany() vendor/v17development/flarum-user-badges/src/Badge/Badge.php:52
[0x00007f7493617480] earnedCount() vendor/v17development/flarum-user-badges/src/Api/Serializer/BadgeSerializer.php:25
[0x00007f7493617400] getDefaultAttributes() vendor/flarum/core/src/Api/Serializer/AbstractSerializer.php:88
[0x00007f7493617330] getAttributes() vendor/sycho/json-api/src/Resource.php:183
[0x00007f74936172b0] getAttributes() vendor/sycho/json-api/src/Resource.php:81
[0x00007f74936171e0] toArray() vendor/sycho/json-api/src/Document.php:194
[0x00007f7493617170] Tobscure\JsonApi\{closure}() vendor/sycho/json-api/src/Document.php:193
[0x00007f7493617100] array_map() vendor/sycho/json-api/src/Document.php:193
[0x00007f7493617080] toArray() vendor/sycho/json-api/src/Document.php:232
[0x00007f7493617020] jsonSerialize() vendor/flarum/core/src/Api/JsonApiResponse.php:27
[0x00007f7493616ec0] __construct() vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php:139
[0x00007f7493616dd0] handle() vendor/flarum/core/src/Http/RouteHandlerFactory.php:41
[0x00007f7493616d40] Flarum\Http\{closure}() vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php:27
[0x00007f7493616cb0] process() vendor/laminas/laminas-stratigility/src/Next.php:49
[0x00007f7493616c10] handle() vendor/kilowhat/flarum-ext-wordpress/src/Middlewares/LogWordpressRequests.php:60
[0x00007f7493616940] process() vendor/laminas/laminas-stratigility/src/Next.php:49
[0x00007f74936168a0] handle() vendor/kilowhat/flarum-ext-wordpress/src/Middlewares/PasswordResetWarningMiddleware.php:20
[0x00007f7493616620] process() vendor/laminas/laminas-stratigility/src/Next.php:49
[15-Dec-2022 05:58:56] [pool flarum-forum] pid 20408
script_filename = public/index.php
[0x00007f7493617d70] getCasts() vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php:822
[0x00007f7493617c70] getCastType() vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php:1427
[0x00007f7493617b70] hasCast() vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php:1488
[0x00007f7493617b00] isEncryptedCastable() vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php:707
[0x00007f7493617a60] castAttribute() vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php:2000
[0x00007f74936179e0] transformModelValue() vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php:451
[0x00007f7493617970] getAttributeValue() vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php:430
[0x00007f7493617900] getAttribute() vendor/flarum/core/src/Database/AbstractModel.php:127
[0x00007f74936177f0] getAttribute() vendor/illuminate/database/Eloquent/Model.php:2029
[0x00007f7493617780] __get() unknown:0
[0x00007ffc48e9c6b0] ???() vendor/sycho/json-api/src/AbstractSerializer.php:38
[0x00007f7493617710] getId() vendor/sycho/json-api/src/Resource.php:173
[0x00007f74936176a0] getId() vendor/sycho/json-api/src/Resource.php:142
[0x00007f7493617620] toIdentifier() vendor/sycho/json-api/src/Collection.php:123
[0x00007f74936175b0] Tobscure\JsonApi\{closure}() vendor/sycho/json-api/src/Collection.php:124
[0x00007f7493617540] array_map() vendor/sycho/json-api/src/Collection.php:124
[0x00007f74936174e0] toIdentifier() vendor/sycho/json-api/src/Relationship.php:70
[0x00007f7493617470] toArray() vendor/sycho/json-api/src/Resource.php:333
[0x00007f7493617400] Tobscure\JsonApi\{closure}() vendor/sycho/json-api/src/Resource.php:332
[0x00007f7493617390] array_map() vendor/sycho/json-api/src/Resource.php:332
[15-Dec-2022 07:17:16] [pool flarum-forum] pid 30820
script_filename = public/index.php
[0x00007f7493618200] addInterfaceListeners() vendor/illuminate/events/Dispatcher.php:339
[0x00007f7493618170] getListeners() vendor/illuminate/events/Dispatcher.php:248
[0x00007f74936180a0] dispatch() vendor/illuminate/database/Connection.php:889
[0x00007f7493618030] event() vendor/illuminate/database/Connection.php:428
[0x00007f7493617fb0] prepared() vendor/illuminate/database/Connection.php:368
[0x00007f7493617f10] Illuminate\Database\{closure}() vendor/illuminate/database/Connection.php:705
[0x00007f7493617e60] runQueryCallback() vendor/illuminate/database/Connection.php:672
[0x00007f7493617d80] run() vendor/illuminate/database/Connection.php:376
[0x00007f7493617cf0] select() vendor/illuminate/database/Query/Builder.php:2414
[0x00007f7493617c80] runSelect() vendor/illuminate/database/Query/Builder.php:2402
[0x00007f7493617bb0] Illuminate\Database\Query\{closure}() vendor/illuminate/database/Query/Builder.php:2936
[0x00007f7493617b10] onceWithColumns() vendor/illuminate/database/Query/Builder.php:2403
[0x00007f7493617a30] get() vendor/illuminate/database/Query/Builder.php:2863
[0x00007f7493617990] aggregate() vendor/illuminate/database/Query/Builder.php:2791
[0x00007f7493617910] count() vendor/illuminate/database/Eloquent/Builder.php:1657
[0x00007f7493617860] __call() vendor/illuminate/support/Traits/ForwardsCalls.php:23
[0x00007f7493617780] forwardCallTo() vendor/illuminate/support/Traits/ForwardsCalls.php:52
[0x00007f74936176e0] forwardDecoratedCallTo() vendor/illuminate/database/Eloquent/Relations/Relation.php:481
[0x00007f7493617660] __call() vendor/v17development/flarum-user-badges/src/Badge/Badge.php:52
[0x00007f7493617600] earnedCount() vendor/v17development/flarum-user-badges/src/Api/Serializer/BadgeSerializer.php:25
[15-Dec-2022 07:17:16] [pool flarum-forum] pid 30824
script_filename = public/index.php
[0x00007f7493618030] execute() vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117
[0x00007f7493617fb0] execute() vendor/illuminate/database/Connection.php:373
[0x00007f7493617f10] Illuminate\Database\{closure}() vendor/illuminate/database/Connection.php:705
[0x00007f7493617e60] runQueryCallback() vendor/illuminate/database/Connection.php:672
[0x00007f7493617d80] run() vendor/illuminate/database/Connection.php:376
[0x00007f7493617cf0] select() vendor/illuminate/database/Query/Builder.php:2414
[0x00007f7493617c80] runSelect() vendor/illuminate/database/Query/Builder.php:2402
[0x00007f7493617bb0] Illuminate\Database\Query\{closure}() vendor/illuminate/database/Query/Builder.php:2936
[0x00007f7493617b10] onceWithColumns() vendor/illuminate/database/Query/Builder.php:2403
[0x00007f7493617a30] get() vendor/illuminate/database/Query/Builder.php:2863
[0x00007f7493617990] aggregate() vendor/illuminate/database/Query/Builder.php:2791
[0x00007f7493617910] count() vendor/illuminate/database/Eloquent/Builder.php:1657
[0x00007f7493617860] __call() vendor/illuminate/support/Traits/ForwardsCalls.php:23
[0x00007f7493617780] forwardCallTo() vendor/illuminate/support/Traits/ForwardsCalls.php:52
[0x00007f74936176e0] forwardDecoratedCallTo() vendor/illuminate/database/Eloquent/Relations/Relation.php:481
[0x00007f7493617660] __call() vendor/v17development/flarum-user-badges/src/Badge/Badge.php:52
[0x00007f7493617600] earnedCount() vendor/v17development/flarum-user-badges/src/Api/Serializer/BadgeSerializer.php:25
[0x00007f7493617580] getDefaultAttributes() vendor/flarum/core/src/Api/Serializer/AbstractSerializer.php:88
[0x00007f74936174b0] getAttributes() vendor/sycho/json-api/src/Resource.php:183
[0x00007f7493617430] getAttributes() vendor/sycho/json-api/src/Resource.php:233
[15-Dec-2022 07:17:18] [pool flarum-forum] pid 30838
script_filename = public/index.php
[0x00007f7493615210] emitBody() vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitter.php:31
[0x00007f74936151b0] emit() vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php:98
[0x00007f7493615120] run() vendor/flarum/core/src/Http/Server.php:45
[0x00007f74936150a0] listen() public/index.php:26
[15-Dec-2022 09:08:54] [pool flarum-forum] pid 16483
script_filename = public/index.php
[0x00007f7493618350] prepare() vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:82
[0x00007f74936182b0] prepare() vendor/illuminate/database/Connection.php:368
[0x00007f7493618190] Illuminate\Database\{closure}() vendor/illuminate/database/Connection.php:705
[0x00007f74936180e0] runQueryCallback() vendor/illuminate/database/Connection.php:672
[0x00007f7493618000] run() vendor/illuminate/database/Connection.php:376
[0x00007f7493617f70] select() vendor/illuminate/database/Query/Builder.php:2414
[0x00007f7493617f00] runSelect() vendor/illuminate/database/Query/Builder.php:2402
[0x00007f7493617e30] Illuminate\Database\Query\{closure}() vendor/illuminate/database/Query/Builder.php:2936
[0x00007f7493617d90] onceWithColumns() vendor/illuminate/database/Query/Builder.php:2403
[0x00007f7493617cb0] get() vendor/illuminate/database/Eloquent/Builder.php:625
[0x00007f7493617b90] getModels() vendor/illuminate/database/Eloquent/Builder.php:609
[0x00007f7493617a90] get() vendor/illuminate/database/Concerns/BuildsQueries.php:294
[0x00007f7493617a20] first() vendor/illuminate/database/Eloquent/Relations/BelongsTo.php:81
[0x00007f74936179a0] getResults() vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php:553
[0x00007f7493617890] getRelationshipFromMethod() vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php:491
[0x00007f7493617810] getRelationValue() vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php:440
[0x00007f74936177a0] getAttribute() vendor/flarum/core/src/Database/AbstractModel.php:127
[0x00007f7493617690] getAttribute() vendor/illuminate/database/Eloquent/Model.php:2029
[0x00007f7493617620] __get() unknown:0
[0x00007ffc48e9cb40] ???() vendor/flarum/core/src/Api/Serializer/AbstractSerializer.php:225
[15-Dec-2022 09:34:56] [pool flarum-forum] pid 21486
script_filename = public/index.php
[0x00007f7493617790] execute() vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117
[0x00007f7493617710] execute() vendor/illuminate/database/Connection.php:373
[0x00007f7493617670] Illuminate\Database\{closure}() vendor/illuminate/database/Connection.php:705
[0x00007f74936175c0] runQueryCallback() vendor/illuminate/database/Connection.php:672
[0x00007f74936174e0] run() vendor/illuminate/database/Connection.php:376
[0x00007f7493617450] select() vendor/illuminate/database/Query/Builder.php:2414
[0x00007f74936173e0] runSelect() vendor/illuminate/database/Query/Builder.php:2626
[0x00007f7493617310] Illuminate\Database\Query\{closure}() vendor/illuminate/database/Query/Builder.php:2936
[0x00007f7493617270] onceWithColumns() vendor/illuminate/database/Query/Builder.php:2628
[0x00007f74936171d0] pluck() vendor/illuminate/database/Eloquent/Builder.php:775
[0x00007f7493617140] pluck() vendor/flarum/core/src/Post/PostRepository.php:93
[0x00007f74936170c0] filterVisibleIds() vendor/flarum/mentions/src/FilterVisiblePosts.php:88
[0x00007f7493616f90] __invoke() vendor/flarum/core/src/Foundation/ContainerUtil.php:30
[0x00007f7493616ec0] Flarum\Foundation\{closure}() vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php:121
[0x00007f7493616dd0] handle() vendor/flarum/core/src/Http/RouteHandlerFactory.php:41
[0x00007f7493616d40] Flarum\Http\{closure}() vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php:27
[0x00007f7493616cb0] process() vendor/laminas/laminas-stratigility/src/Next.php:49
[0x00007f7493616c10] handle() vendor/kilowhat/flarum-ext-wordpress/src/Middlewares/LogWordpressRequests.php:60
[0x00007f7493616940] process() vendor/laminas/laminas-stratigility/src/Next.php:49
[0x00007f74936168a0] handle() vendor/kilowhat/flarum-ext-wordpress/src/Middlewares/PasswordResetWarningMiddleware.php:20`
Flarum information
Flarum core 1.6.2
PHP version: 7.4.30
MySQL version: 5.5.5-10.4.20-MariaDB-1:10.4.20+maria~buster-log
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, enchant, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, intl, json, exif, mongodb, msgpack, mysqli, odbc, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, apc, posix, readline, redis, shmop, SimpleXML, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xmlreader, xmlrpc, xmlwriter, xsl, zip, Phar, memcached, ionCube Loader, Zend OPcache
+---------------------------------+---------+--------+
| Flarum Extensions | | |
+---------------------------------+---------+--------+
| ID | Version | Commit |
+---------------------------------+---------+--------+
| flarum-tags | v1.6.1 | |
| flarum-flags | v1.6.1 | |
| flarum-suspend | v1.6.1 | |
| flarum-likes | v1.6.1 | |
| flarum-markdown | v1.6.1 | |
| flarum-lock | v1.6.1 | |
| flarum-subscriptions | v1.6.1 | |
| fof-byobu | 1.1.7 | |
| fof-polls | 1.3.0 | |
| antoinefr-money | v1.2.0 | |
| ziiven-daily-check-in | v0.3.1 | |
| zerosonesfun-member | 1.2 | |
| zerosonesfun-direct-links | 3.1 | |
| v17development-user-badges | v1.1.0 | |
| v17development-seo | v1.8.0 | |
| therealsujitk-gifs | v4.1.1 | |
| the-turk-flamoji | 1.0.4 | |
| sycho-profile-cover | v1.3.3 | |
| sycho-move-posts | v0.1.7 | |
| noriods-auto-more | v1.0.0 | |
| nearata-remove-pane | v2.0.1 | |
| nearata-cakeday | v2.1.0 | |
| matteocontrini-imgur-upload | v3.9.1 | |
| kilowhat-wordpress | 1.7.6 | |
| ianm-syndication | 1.2.2 | |
| fof-webhooks | 1.1.1 | |
| fof-user-bio | 1.1.1 | |
| fof-socialprofile | 1.1.4 | |
| fof-sitemap | 1.0.3 | |
| fof-reactions | 1.1.3 | |
| fof-profile-image-crop | 1.1.0 | |
| fof-pretty-mail | 1.1.1 | |
| fof-nightmode | 1.5.1 | |
| fof-merge-discussions | 1.3.1 | |
| fof-links | 1.1.2 | |
| fof-linguist | 1.0.4 | |
| fof-ignore-users | 1.1.0 | |
| fof-gamification | 1.6.2 | |
| fof-formatting | 1.0.2 | |
| fof-follow-tags | 1.1.7 | |
| fof-drafts | 1.2.0 | |
| fof-bbcode-details | 1.1.0 | |
| flarum-sticky | v1.6.1 | |
| flarum-statistics | v1.6.1 | |
| flarum-pusher | v1.6.1 | |
| flarum-mentions | v1.6.1 | |
| flarum-lang-english | v1.6.0 | |
| flarum-emoji | v1.6.1 | |
| flarum-bbcode | v1.6.0 | |
| davwheat-inline-group-badges | 1.0.0 | |
| datlechin-silent-edit | v0.1.0 | |
| datitisev-post-galleries | 1.0.0 | |
| darkle-fancybox | 1.1.2 | |
| clarkwinkelmann-vote-with-money | 1.0.0 | |
| clarkwinkelmann-roll-die | 1.0.0 | |
| clarkwinkelmann-author-change | 1.0.3 | |
| askvortsov-rich-text | v2.1.7 | |
| askvortsov-pwa | v3.1.3 | |
| acpl-mobile-tab | 1.1.1