Skip to main content ↑ ↓
Slow Page Load time Started by Hj Ahmad Rasyid Hj Ismail · · Read 612 times 0 Members and 2 Guests are viewing this topic.

Slow Page Load time

2.0 Beta 1 is way slower... Too buggy to me...

Re: Re: Load time achievement

Reply #1 –

Screenshot 2026-08-01 105301.jpg I tried it on this site.  It varies from run to run which is server speed I guess, but got good numbers.  What more are you expecting?
Last Edit: August 01, 2026, 05:53:21 pm by Spuds
Its me Its me, its RVD

Re: Re: Load time achievement

Reply #2 –

Nope, the released one is the buggy one, not this site. Queries take more than 3 seconds while 1.1 is just 0.03. So yeah, I have tested, compared them and its definitely buggy.

Re: Re: Load time achievement

Reply #3 –

For clarity, this site is running the released beta version:man_shrugging:

Re: Re: Load time achievement

Reply #4 –

One thought is to try the "Disable hostname lookups" as that is often slow, especially on development boxes.

Re: Re: Load time achievement

Reply #5 –

I may have posted in wrong topic but I am still talking about the buggy thing in Elkarte 2.0 beta 1, still about load time, but only in terms of its queries. Yes, I was not actually talking about Pagespeed or GMetrix site assessment, but the queries in comparing it with 1.1, which is a big difference.

Attached below are the images to ease explanation.
queries-2.0 beta 1.png
queries-1.1.10.png

However, after researching, I realized the difference is because this beta version cannot use "localhost" to connect to database like 1.1, but instead requires "127.0.0.1", for it to work.

Quotelocalhost: Often forces a local Unix socket or named pipe connection, which bypasses the network stack entirely and runs very fast (0.03 seconds).

127.0.0.1: Forces an IPv4 TCP/IP loopback connection, which goes through the network layer.

I installed both in the same server, same nginx with http3 quic setup, in the one ISPConfig, but I could not find fault on my side except that, so I really think this is a bug.

Re: Re: Load time achievement

Reply #6 –

Quote from: "Hj Ahmad Rasyid Hj Ismail" – However, after researching, I realized the difference is because this beta version cannot use "localhost" to connect to database like 1.1, but instead requires "127.0.0.1", for it to work.


Huh?

Where you get that from?
My site is running beta and set to localhost for database connection.

Re: Re: Load time achievement

Reply #7 –

I will retry, but last time it was not working, and I have to use 127.0.0.1. Anyway, queries delays are facts, whether or not localhost vs 127.0.0.1 was the main issue or otherwise not.

Edited: Changing it to localhost definitely causing error 500 issues. I've just re-tried. 1.1 is using localhost just fine as mentioned earlier, so not my server issue.
Last Edit: August 02, 2026, 12:02:05 pm by Hj Ahmad Rasyid Hj Ismail

Re: Re: Load time achievement

Reply #8 –

That is strange.  

This site is on a ispconfig control panel, mariadb, apache and connects via localhost in the admin panel.  What happens when you are at the command line and try to connect with mysql -h localhost -u youruser -p and then mysql -h 127.0.0.1 -u youruser -p  to see if you get a socket or permissions error.

Re: Re: Load time achievement

Reply #9 –

Via terminal, both connected to database just fine, so this has become more mysterious to me, but if I changed 127.0.0.1 to localhost in the Settings.php, internal server error 500 occurred, so I am not so sure, except to assume the bug is on Beta 2 from this error.log:
Code: [Copy]
tail -f /var/www/clients/clientXX/webYY/log/error.log
#1 /web/sources/ElkArte/Database/AbstractQuery.php(539): ElkArte\Database\Mysqli\Query->executeQuery()
#2 /web/sources/ElkArte/Database/Mysqli/Connection.php(54): ElkArte\Database\AbstractQuery->query()
#3 /web/sources/database/Database.subs.php(73): ElkArte\Database\Mysqli\Connection::initiate()
#4 /web/sources/Load.php(1261): database()
#5 /web/bootstrap.php(358): loadDatabase()
#6 /web/bootstrap.php(90): Bootstrap->bringUp()
#7 /web/bootstrap.php(66): Bootstrap->bringUpBasics()
#8 /web/index.php(41): Bootstrap->__construct()
#9 {main}
  thrown in /web/sources/ElkArte/Database/Mysqli/Query.php on line 165" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: elkarte2.sch .my, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/var/lib/php8.4-fpm/webYY.sock:", host: "elkarte2.sch.my"
Last Edit: August 02, 2026, 11:44:05 pm by Hj Ahmad Rasyid Hj Ismail

Re: Re: Load time achievement

Reply #10 –

Interesting ...

So it is initializing the connection mysqli_init() and then making a successful connection with real_connect() but fails trying to do a SET NAMES UTF8 

The actual error message would have been a couple of lines about the start of that tail, so if you could post that it would be a useful clue.

Re: Re: Load time achievement

Reply #11 –

You mean in Elkarte 2.0 Beta 1 forum? I will retry and report later.

Re: Re: Load time achievement

Reply #12 –

Yes the 2.0 error log, that tail -f /var/www/clients/clientXX/webYY/log/error.log you posted needed a few more lines above where it started, maybe tail -n 20 so we can see just what PHP complained about.

Re: Re: Load time achievement

Reply #13 –

Code: [Copy]
[code]2026/08/03 22:32:18 [error] 1944#1944: *18202 FastCGI sent in stderr: "PHP message: PHP Warning:  mysqli::real_connect(): (HY000/2002): No such file or directory in /web/sources/ElkArte/Database/Mysqli/Connection.php on line 43; PHP message: PHP Fatal error:  Uncaught Error: mysqli object is not fully initialized in /web/sources/ElkArte/Database/Mysqli/Query.php:165
Stack trace:
#0 /web/sources/ElkArte/Database/Mysqli/Query.php(165): mysqli_query()
#1 /web/sources/ElkArte/Database/AbstractQuery.php(539): ElkArte\Database\Mysqli\Query->executeQuery()
#2 /web/sources/ElkArte/Database/Mysqli/Connection.php(54): ElkArte\Database\AbstractQuery->query()
#3 /web/sources/database/Database.subs.php(73): ElkArte\Database\Mysqli\Connection::initiate()
#4 /web/sources/Load.php(1261): database()
#5 /web/bootstrap.php(358): loadDatabase()
#6 /web/bootstrap.php(90): Bootstrap->bringUp()
#7 /web/bootstrap.php(66): Bootstrap->bringUpBasics()
#8 /web/index.php(41): Bootstrap->__construct()
#9 {main}
  thrown in /web/sources/ElkArte/Database/Mysqli/Query.php on line 165" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: elkarte2.sch.my, request: "GET /index.php HTTP/2.0", upstream: "fastcgi://unix:/var/lib/php8.4-fpm/webYY.sock:", host: "elkarte2.sch.my", referrer: "https://elkarte2.sch.my/index.php?action=admin;area=logs;sa=errorlog;desc"
2026/08/03 22:32:21 [error] 1944#1944: *18202 FastCGI sent in stderr: "PHP message: PHP Warning:  mysqli::real_connect(): (HY000/2002): No such file or directory in /web/sources/ElkArte/Database/Mysqli/Connection.php on line 43; PHP message: PHP Fatal error:  Uncaught Error: mysqli object is not fully initialized in /web/sources/ElkArte/Database/Mysqli/Query.php:165
Stack trace:
#0 /web/sources/ElkArte/Database/Mysqli/Query.php(165): mysqli_query()
#1 /web/sources/ElkArte/Database/AbstractQuery.php(539): ElkArte\Database\Mysqli\Query->executeQuery()
#2 /web/sources/ElkArte/Database/Mysqli/Connection.php(54): ElkArte\Database\AbstractQuery->query()
#3 /web/sources/database/Database.subs.php(73): ElkArte\Database\Mysqli\Connection::initiate()
#4 /web/sources/Load.php(1261): database()
#5 /web/bootstrap.php(358): loadDatabase()
#6 /web/bootstrap.php(90): Bootstrap->bringUp()
#7 /web/bootstrap.php(66): Bootstrap->bringUpBasics()
#8 /web/index.php(41): Bootstrap->__construct()
#9 {main}
  thrown in /web/sources/ElkArte/Database/Mysqli/Query.php on line 165" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: elkarte2.sch.my, request: "GET /index.php?action=profile;area=forumprofile;u=1 HTTP/2.0", upstream: "fastcgi://unix:/var/lib/php8.4-fpm/webYY.sock:", host: "elkarte2.sch.my", referrer: "https://elkarte2.sch.my/index.php?action=profile;area=account;u=1"
2026/08/03 22:32:23 [error] 1944#1944: *18202 FastCGI sent in stderr: "PHP message: PHP Warning:  mysqli::real_connect(): (HY000/2002): No such file or directory in /web/sources/ElkArte/Database/Mysqli/Connection.php on line 43; PHP message: PHP Fatal error:  Uncaught Error: mysqli object is not fully initialized in /web/sources/ElkArte/Database/Mysqli/Query.php:165
Stack trace:
#0 /web/sources/ElkArte/Database/Mysqli/Query.php(165): mysqli_query()
#1 /web/sources/ElkArte/Database/AbstractQuery.php(539): ElkArte\Database\Mysqli\Query->executeQuery()
#2 /web/sources/ElkArte/Database/Mysqli/Connection.php(54): ElkArte\Database\AbstractQuery->query()
#3 /web/sources/database/Database.subs.php(73): ElkArte\Database\Mysqli\Connection::initiate()
#4 /web/sources/Load.php(1261): database()
#5 /web/bootstrap.php(358): loadDatabase()
#6 /web/bootstrap.php(90): Bootstrap->bringUp()
#7 /web/bootstrap.php(66): Bootstrap->bringUpBasics()
#8 /web/index.php(41): Bootstrap->__construct()
#9 {main}
  thrown in /web/sources/ElkArte/Database/Mysqli/Query.php on line 165" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: elkarte2.sch.my, request: "GET /index.php?action=mentions;sa=fetch;api=json;lastsentmention=0;lastsentpm=0 HTTP/2.0", upstream: "fastcgi://unix:/var/lib/php8.4-fpm/webYY.sock:", host: "elkarte2.sch.my", referrer: "https://elkarte2.sch.my/index.php?action=admin;area=permissions;sa=modify;group=0"
2026/08/03 22:32:25 [error] 1944#1944: *18202 FastCGI sent in stderr: "PHP message: PHP Warning:  mysqli::real_connect(): (HY000/2002): No such file or directory in /web/sources/ElkArte/Database/Mysqli/Connection.php on line 43; PHP message: PHP Fatal error:  Uncaught Error: mysqli object is not fully initialized in /web/sources/ElkArte/Database/Mysqli/Query.php:165
Stack trace:
#0 /web/sources/ElkArte/Database/Mysqli/Query.php(165): mysqli_query()
#1 /web/sources/ElkArte/Database/AbstractQuery.php(539): ElkArte\Database\Mysqli\Query->executeQuery()
#2 /web/sources/ElkArte/Database/Mysqli/Connection.php(54): ElkArte\Database\AbstractQuery->query()
#3 /web/sources/database/Database.subs.php(73): ElkArte\Database\Mysqli\Connection::initiate()
#4 /web/sources/Load.php(1261): database()
#5 /web/bootstrap.php(358): loadDatabase()
#6 /web/bootstrap.php(90): Bootstrap->bringUp()
#7 /web/bootstrap.php(66): Bootstrap->bringUpBasics()
#8 /web/index.php(41): Bootstrap->__construct()
#9 {main}
  thrown in /web/sources/ElkArte/Database/Mysqli/Query.php on line 165" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: elkarte2.sch.my, request: "GET /index.php HTTP/2.0", upstream: "fastcgi://unix:/var/lib/php8.4-fpm/webYY.sock:", host: "elkarte2.sch.my", referrer: "https://elkarte2.sch.my/index.php?action=admin;area=permissions;sa=modify;group=0"
2026/08/03 22:32:29 [error] 1944#1944: *18202 FastCGI sent in stderr: "PHP message: PHP Warning:  mysqli::real_connect(): (HY000/2002): No such file or directory in /web/sources/ElkArte/Database/Mysqli/Connection.php on line 43; PHP message: PHP Fatal error:  Uncaught Error: mysqli object is not fully initialized in /web/sources/ElkArte/Database/Mysqli/Query.php:165
Stack trace:
#0 /web/sources/ElkArte/Database/Mysqli/Query.php(165): mysqli_query()
#1 /web/sources/ElkArte/Database/AbstractQuery.php(539): ElkArte\Database\Mysqli\Query->executeQuery()
#2 /web/sources/ElkArte/Database/Mysqli/Connection.php(54): ElkArte\Database\AbstractQuery->query()
#3 /web/sources/database/Database.subs.php(73): ElkArte\Database\Mysqli\Connection::initiate()
#4 /web/sources/Load.php(1261): database()
#5 /web/bootstrap.php(358): loadDatabase()
#6 /web/bootstrap.php(90): Bootstrap->bringUp()
#7 /web/bootstrap.php(66): Bootstrap->bringUpBasics()
#8 /web/index.php(41): Bootstrap->__construct()
#9 {main}
  thrown in /web/sources/ElkArte/Database/Mysqli/Query.php on line 165" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: elkarte2.sch.my, request: "GET /index.php?action=admin;area=logs;sa=errorlog;desc HTTP/2.0", upstream: "fastcgi://unix:/var/lib/php8.4-fpm/webYY.sock:", host: "elkarte2.sch.my", referrer: "https://elkarte2.sch.my/index.php?action=admin;area=logs;sa=errorlog;desc"
The same just repeating if I changed to "localhost", nothing much other than that.
[/code]
The same just repeating if I changed to "localhost", nothing much other than that.

Re: Re: Load time achievement

Reply #14 –

I have figure out what's forbidding me from using localhost, so that part is resolved now, I can use it just fine now. Old caches are all cleared. new have been built.

The queries delays are still the same though. It is still around 3 seconds ++ while 1.1 is around 0.02-0.03.

2.0 less queries but longer time.
queries-2.0 beta 1.png

1.1 more queries but lesser time.
queries-1.1.10.png