Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web page access is too slow, request improvement #15655

Open
linjialiang opened this issue Dec 16, 2019 · 48 comments
Open

Web page access is too slow, request improvement #15655

linjialiang opened this issue Dec 16, 2019 · 48 comments
Labels
Bug A problem or regression with an existing feature enhancement A feature request for improving phpMyAdmin
Projects

Comments

@linjialiang
Copy link

Web page access is too slow, while adminer web access is very fast, making phpmyadmin much less attractive

@ibennetch
Copy link
Member

ibennetch commented Dec 16, 2019 via email

@williamdes williamdes added enhancement A feature request for improving phpMyAdmin question Used when we need feedback from the submitter or when the issue is a question about PMA labels Dec 16, 2019
@williamdes williamdes added this to Needs triage in issues via automation Dec 16, 2019
@williamdes williamdes moved this from Needs triage to Enhancements in issues Dec 16, 2019
@linjialiang
Copy link
Author

图片

图片

My access is really slow, also Jquery has a lot of bugs!

@linjialiang
Copy link
Author

phpmyadmin is the latest stable version

@linjialiang
Copy link
Author

In contrast to adminer, the speed was astronomical

@williamdes
Copy link
Member

@linjialiang what version of phpMyAdmin are you using?

The server is on MacOS/Windows/Linux?

Please send a lot more information so I can help you :)

@linjialiang
Copy link
Author

@williamdes

name version
phpmyadmin 4.9.2
OS Microsoft Windows [version 10.0.17763.914]

Composer installation phpMyAdmin

$ composer create-project phpmyadmin/phpmyadmin

@linjialiang
Copy link
Author

@williamdes
I also have two servers, debian and centos, and phpMyAdmin that works on them is not very smooth either.
Relatively speaking, the lower the phpmyadmin version, the smoother the browser access will be

@linjialiang
Copy link
Author

I see that the execution time returned by phpMyAdmin is very fast.
The reason why phpMyAdmin is slow is probably because of the slow rendering of the front-end code

图片

@linjialiang
Copy link
Author

phpMyAdmin 4.4.15.5

图片

phpMyAdmin 4.2.12deb2+deb8u6

图片

phpMyAdmin 4.9.2

图片

@williamdes
Copy link
Member

I see that the execution time returned by phpMyAdmin is very fast.
The reason why phpMyAdmin is slow is probably because of the slow rendering of the front-end code

I agree that we have some code to improve
Does your data results have a lot of foreign key links?

@williamdes
Copy link
Member

A'd for the jquery warnings, do not worry I fixed them in another version
Maybe 5.0
I will have a look

@linjialiang
Copy link
Author

Your work is great and I admire you and hope phpmyadmin gets better and better

@linjialiang
Copy link
Author

@williamdes

Phpmyadmin 5.0.0 operates smoothly under LNMP
But it is still slow to operate in a wamp development environment

@williamdes
Copy link
Member

@linjialiang is Xdebug extension enabled on wamp?

@linjialiang
Copy link
Author

I've enabled xdebug

@linjialiang
Copy link
Author

图片

@linjialiang
Copy link
Author

@williamdes It's much faster to remove the xdebug plug-in, but the xdebug extension is still useful to me
I've also enabled xdebug on Linux, but it's still fast

@williamdes
Copy link
Member

@linjialiang Thank you for the precious feedback :)

@williamdes williamdes added enhancement A feature request for improving phpMyAdmin and removed enhancement A feature request for improving phpMyAdmin question Used when we need feedback from the submitter or when the issue is a question about PMA labels Dec 28, 2019
@williamdes williamdes moved this from Enhancements to Reproduced in issues Dec 28, 2019
@linjialiang
Copy link
Author

Is it possible that part of my PHP plugin is missing?
001

@williamdes
Copy link
Member

Is it possible that part of my PHP plugin is missing?

I am not sure to understand your question

I just remembered that I had to disable x-debug on our PHP 7.4 CI for Linux build since they where so slow (a3d6217)

@linjialiang
Copy link
Author

ok

@linjialiang
Copy link
Author

@williamdes Factors that affect the efficiency of phpmyadmin web pages:

  1. Effect of php_xdebug on phpmyadmin:

    os effect Whether php_xdebug compiles itself
    windows 10 Greatly reduced efficiency The official download
    Linux Affected, but less so than Windows Compile and install yourself
  2. Effect of my.ini configuration parameters on phpmyadmin:

    skip-external-locking
    bind-address                = 127.0.0.1

    Either of these two parameters, if opened, will affect the efficiency of the phpmyadmin web page

    os effect Whether MariaDB compiles itself
    windows 10 Greatly reduced efficiency The official download
    Linux Almost no effect Compile and install yourself

@David263
Copy link

David263 commented Jan 4, 2021

I am also attempting to switch to adminer due to the extreme slowness of phpmyadmin. But it doesn't seem to behave in the same way and I think I messed up my privileges. Can't you please analyse the slowness of phpmyadmin and fix it? Won't it just die if you don't fix it?

@ghost
Copy link

ghost commented Jan 8, 2021

PHPMyAdmin was also very slow on my machine.
I had to wait up to ten seconds to show any PHPMyAdmin page, no matter the databases size (you know how frustrating it is).
I finally investigated, for hours, and found a solution.

I am using Bitnami WAMP Stack 8.0.0-1 on Windows 10.
I opened the file phpmyadmin\htdocs\config.inc.php,
replaced $cfg['Servers'][$i]['host'] = 'localhost'; by $cfg['Servers'][$i]['host'] = '127.0.0.1';,
and restarted my servers.

Now PHPMyAdmin is fast, every page shows within 1-2 seconds.

I have not investigated why PHPMyAdmin has issues locating 'localhost'.
It can be a PHPMyAdmin issue, an Apache issue, a Windows issue, ...

@David263
Copy link

David263 commented Jan 8, 2021

Thank you! Please also give the exact URL you use to run phpmyadmin. I use either http://127.0.0.1/phpmyadmin or http://localhost/phpmyadmin, not sure if either is preferred. If I try https, I get errors, since phpmyadmin has no valid certificate. That is okay with me, since I'm running phpmyadmin locally.

@ghost
Copy link

ghost commented Jan 8, 2021

@David263
I use either http://127.0.0.1/phpmyadmin/ or http://localhost/phpmyadmin/ too, it doesn't make any difference on the browser side.
Ah, I just noticed there is no https, but as I use it locally too, I don't care.

@David263
Copy link

David263 commented Jan 8, 2021

There was only one instance of "localhost", but replacing it by 127.0.0.1 caused an infinite loop in phphmyadmin when trying to select a database. When I need speed, I'll use adminer, which is harder to use but faster, and works with Bitnami WAMP Stack.

@ghost
Copy link

ghost commented Jan 8, 2021

An infinite loop ?
Do you have any particular configuration ?
Have you tried restarting the servers ?
I made a fresh install of Bitnami WAMP Stack 8.0.0-1 yesterday (with PHP 8.0 and PHPMyAdmin 5.0.4 inside), so I have no particular configuration except $cfg['Servers'][$i]['host'] = '127.0.0.1'; in .config.inc.php.
You could try a fresh install of the latest WAMP Stack, but it's a bit overkill.

@David263
Copy link

David263 commented Jan 8, 2021

Definitely an infinite loop, had to restart computer. Got it working by returning to 'localhost'. Possibly my own fault, since I have to modify httpd.conf to meet my local website and software development needs. That makes upgrading the WAMP stack, which I also have just done, time-consuming. Neither Apache, PHP, nor PHPMyAdmin are written to do complete self-testing of user configuration to ensure correctness. Frankly, I don't have the time, for example, to read and understand every Apache directive, some of which are almost impossible to understand due mostly to the use of undefined jargon and assumptions. Unlike with my 40 years of writing pure software, where the syntax and semantics of any programming language could be fully understood to any desired depth, as a Web developer I have to rely on question-answering fora to make my way through to laborious success with server configuration and usage and at least four programming languages (HTML, JavaScript, CSS, PHP). Even this process becomes difficult when one is banned from a certain major forum by its zealous users who downvote questions that in their opinion do not meet the stringent requirements, such that one is allowed only one question every six months. Sorry to go off-topic.

@williamdes
Copy link
Member

Hi @David263

I would like to solve this issue you are running into, could you let me know more about your operating system, database server etc .. ?

@David263
Copy link

PHPMyAdmin has always been unreasonably slow (probably because it is implemented in tiny functions in hundreds of files), but it has gotten much worse recently. My environment:

    Windows Home
Bitnami WAMP Stack: 7.4.13-0
Apache: Apache/2.4.46 (Win64)
    OpenSSL/1.1.1h
    PHP/7.4.13
MySQL: 8.0.22
phpmyadmin: version 5.0.4

@williamdes
Copy link
Member

williamdes commented Jan 13, 2021

PHPMyAdmin has always been unreasonably slow (probably because it is implemented in tiny functions in hundreds of files), but it has gotten much worse recently. My environment:

    Windows Home
Bitnami WAMP Stack: 7.4.13-0
Apache: Apache/2.4.46 (Win64)
    OpenSSL/1.1.1h
    PHP/7.4.13
MySQL: 8.0.22
phpmyadmin: version 5.0.4

Thanks, are you using a SSD or a HDD ?
Has the database server a lot of data ?
Do you have docker installed ?

@David263
Copy link

SSD with 18 GB free. Almost no data on MySQL and I rarely use this server, so it is usually idle. I wouldn't install docker if you paid me. My local server has no known overhead; its full power is available to PHPMyAdmin if it needs it.

Please, on your own system, compare the performance of PHPMyAdmin with Adminer. Don't just assume that PHPMyAdmin is a just a little slower. It is DRAMATICALLY slower, almost a minute to access a small database as compared with a fraction of a second with Adminer.

Assuming that both programs access MySQL, this indicates that the fault is in the program, not in MySQL.

@williamdes
Copy link
Member

SSD with 18 GB free. Almost no data on MySQL and I rarely use this server, so it is usually idle. I wouldn't install docker if you paid me. My local server has no known overhead; its full power is available to PHPMyAdmin if it needs it.

Please, on your own system, compare the performance of PHPMyAdmin with Adminer. Don't just assume that PHPMyAdmin is a just a little slower. It is DRAMATICALLY slower, almost a minute to access a small database as compared with a fraction of a second with Adminer.

Assuming that both programs access MySQL, this indicates that the fault is in the program, not in MySQL.

Thanks again.

Sure, I will compare but for now I did not see anything like " almost a minute to access a small database"

I am flagging this as very important before next release
cc @ibennetch

@williamdes williamdes added this to the 5.1.0 milestone Jan 13, 2021
@williamdes williamdes added the Bug A problem or regression with an existing feature label Jan 13, 2021
@ibennetch
Copy link
Member

Thanks @williamdes, I actually was looking at this and working on a response.

I'm all for making speed improvements, but I don't see the performance problems that some of you are having. I completely understand how frustrating it is, but it's also clearly not a universal problem. I have a system with 1GB of memory and a single core of an older processor that runs phpMyAdmin and it's not frustratingly slow.

We should continue to look in to this, but it seems to be a relatively isolated problem right now that's tough to track down.

@ibennetch
Copy link
Member

As far as running xdebug, which is mostly what this specific ticket was originally about, I don't have many thoughts. Running any program through a debugger is going to slow things down, I'm actually more surprised that it wasn't insufferably slow on Linux than I am surprised that Windows was slow. I'd welcome any contributions to solve the problem, but the fact that it's relatively responsive on Linux but not Windows seems to me more of a platform problem than something specific to our code. Again, further research or contributions to improve it are welcome, but that's my perspective at the moment.

@ibennetch ibennetch removed this from the 5.1.0 milestone Jan 19, 2021
@Thricehappy
Copy link

PHPMyAdmin was also very slow on my machine. I had to wait up to ten seconds to show any PHPMyAdmin page, no matter the databases size (you know how frustrating it is). I finally investigated, for hours, and found a solution.

I am using Bitnami WAMP Stack 8.0.0-1 on Windows 10. I opened the file phpmyadmin\htdocs\config.inc.php, replaced $cfg['Servers'][$i]['host'] = 'localhost'; by $cfg['Servers'][$i]['host'] = '127.0.0.1';, and restarted my servers.

Now PHPMyAdmin is fast, every page shows within 1-2 seconds.

I have not investigated why PHPMyAdmin has issues locating 'localhost'. It can be a PHPMyAdmin issue, an Apache issue, a Windows issue, ...

Just wanted to say thanks for this detail. This fixed my slow-load issue for phpmyadmin.

@vidz-45
Copy link

vidz-45 commented Apr 6, 2023

HI ,

when opening tab phpmyadmin 4.9.11 after fresh install on ubuntu 22.04 +php7.4 + mariadb 10.6 is slow, but after we wait for tab already open, and we open again, it is not slow, anybody know to solve it?

we already try to some workaround:

  1. change $cfg['Servers'][$i]['host'] = 'localhost'; to $cfg['Servers'][$i]['host'] = '127.0.0.1; but not work, still slow
  2. adding skip-name-resolve on mariadb configuration , not work still slow
  3. update phpmyadmin 5.2 + snapshot development, not work still slow

@williamdes
Copy link
Member

Hi @vidz-45
Can you update your phpMyAdmin to 5.2.1 using our Ubuntu PPA?
See: Wiki for install methods on Ubuntu/Debian

At least you will be up to date, and for the slowness maybe you are using xdebug?

Is the database local?
What are the specs of the database server and phpmyadmin web machine?

@vidz-45
Copy link

vidz-45 commented May 9, 2023

Hi @williamdes ,
thanks for reply.
Can you update your phpMyAdmin to 5.2.1 using our Ubuntu PPA?
phpMyAdmin to 5.2.1 does it support php 7.4? because I read that phpMyadmin 5.2.1 just compatible with PHP 7.2 and newer and MySQL/MariaDB 5.5.

At least you will be up to date, and for the slowness maybe you are using xdebug?
no, im not using xdebug
Is the database local?
yes. database local
What are the specs of the database server and phpmyadmin web machine?
is a ubuntu 22 VM with 12 Vcpu and 64Gb RAM

HI @williamdes ,
i already try to install but phpMyAdmin 5.21 just support php 8, not php 7.4
image

@williamdes
Copy link
Member

Hi @vidz-45

phpMyAdmin to 5.2.1 does it support php 7.4? because I read that phpMyadmin 5.2.1 just compatible with PHP 7.2 and newer and MySQL/MariaDB 5.5.

It does, as you read on https://github.com/phpmyadmin/phpmyadmin/wiki/DebianUbuntu#why-does-the-ppa-only-support-php-80 I have no choice to require PHP 8. Only for Ubuntu PPA jammy users.

That said, If you know what you are doing, then edit the apt source file, and switch jammy for focal.
And only PHP 7.2 will be required, but if it gives errors you will know why ;)

What are the specs of the database server and phpmyadmin web machine?
is a ubuntu 22 VM with 12 Vcpu and 64Gb RAM

Okay, nice specs. With a local installation it should not be slow at all.
Is the database server under a lot of load ?
Do you have a lot of tables/databases ?

@vidz-45
Copy link

vidz-45 commented May 10, 2023

@williamdes,
Hi, right, a local installation it should not be slow . but this is different.I'm also confused, why when I click the new tab, it only loads for a while, but after loading is complete, I open other tabs and databases smoothly. but it is happen when im addding DNS server on IP configuration. if im not adding DNS server on Ip configuration , phpmyadmin working smooth. not slow
Do you have a lot of tables/databases ?
no i dont have a lot table/database, because it is fresh installation,
image

@vidz-45
Copy link

vidz-45 commented Jun 23, 2023

HI,
maybe in my case, the possible reason for the slowness is when phpmyadmin loads the version check.php script, because we inspect on my browser when loading this script status is pending , maybe any solution to skip the version check.php script?

@liviuconcioiu
Copy link
Contributor

maybe any solution to skip the version check.php script?

Add $cfg['VersionCheck'] = false; to your config.inc.php file.

@vidz-45
Copy link

vidz-45 commented Jun 26, 2023

Hi @liviuconcioiu

it works, thanks a lot

@KrillinsWorld
Copy link

KrillinsWorld commented Sep 6, 2023

I too am using PHPMYADMIN V5.2.1 on Windows Server 2022 DataCenter for development. And it was taking 45 - 90 seconds or so just to load/open PHPMYADMIN. I am using Apache 2.4.57 with PHP v8.2.8 on a rather old Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz 2.39 GHz with 8GB DDR3 using MariaDB 10.11.2 with a dedicated video card (Nvidia GF GT 710 4GB). I switched from MySQL due to faster performance and response time as well. And while installing MariaDB it comes with HeidiSQL to interface with your database just FYI. I do not use any webserver "stack" because they are too limited! I used to use XAMP, but they were NEVER up-to-date and you could not update modules like PHP, APACHE, MySQL/MariaDB. So I broke free of this limitation. Also because of the constant database corruption!

I need to chime in here because NO one has mentioned the fact of any other extensions being used in PHP except XDebug (which as a developer), is crucial.

PHPMYADMIN may be functioning faster on LINUX system because PHP automatically enables a form of PHP accelerator in these environments. However, PHP doesn't enable the built in accelerator (OPcache) attached to zend with Windows Environments.

I enabled this with my development environment and it gave it a boost. And BTW, because my install was done on 7/2/2023 (just a few months ago), my PHPMYADMIN config already set the configuration to the localhost IP address 127.0.01, so I did not have to change that when I opened up PHPMYADMIN config.inc.php. I tried this because wincache is no longer being developed and the only version one can find is for PHP 8.0.8 and I do not have the time to build wincache for PHP 8.2.8. I was looking for an alternative and found PHP has this built in. Edit your PHP.INI file, Look for:
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
[...]
;zend_extension=opcache

and remove the ; before the zend to enable the extension. Then find the following settings for OPCache further down in the file and enable the following two settings;

[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=1

; Determines if Zend OPCache is enabled for the CLI version of PHP
opcache.enable_cli=1

Restart Your Webserver!

I enabled these lines in PHP.INI on my system so no need to add anything or find another. It sort of works and boosts performance for PHP. I have 24 databases (not including any system databases) at 1.61GB (my playerstats database is 1GB of that) but I have ZERO load on my system at this time. It seems now even with XDEBUG enabled took maybe <30 seconds to load when you first load PHPMYADMIN after enabling OPCache. I timed it opening at 7.37 seconds (default theme). As I see no one else has mentioned using any 3rd party themes, as I thought the one I was using was slowing PHPMYADMIN down, but that was not really the problem.

I hope this helps someone as this is NOT an isolated issue unless you call an isolated issue being "Windows User" isolated?

Best Regards,
-Krillin

@kamil-tekiela
Copy link
Contributor

@KrillinsWorld 7 seconds is still a lot. This is probably because you have xDebug permanently enabled and you don't have any debugger listening for the connection. If you disable xDebug's debugging functionality or start the debugger then it should drop to 1.5s. With xDebug extension disabled completely, it should drop to ~700ms.

This problem isn't specific to phpMyAdmin. You will notice this with other applications, e.g. Laravel. This heavily depends on your setup, not the project.

However, we would love to be able to make phpMyAdmin faster. If you can identify any of the actions in phpMyAdmin that takes unusually long, please don't hesitate to let us know.

@KrillinsWorld
Copy link

@KrillinsWorld 7 seconds is still a lot. This is probably because you have xDebug permanently enabled and you don't have any debugger listening for the connection. If you disable xDebug's debugging functionality or start the debugger then it should drop to 1.5s. With xDebug extension disabled completely, it should drop to ~700ms.

This problem isn't specific to phpMyAdmin. You will notice this with other applications, e.g. Laravel. This heavily depends on your setup, not the project.

However, we would love to be able to make phpMyAdmin faster. If you can identify any of the actions in phpMyAdmin that takes unusually long, please don't hesitate to let us know.

With enabling OPCache, I tried everything under the sun to get Optimization enabled under this running environment. To my surprise, I learned XDEBUG was conflicting with JIT and is required to be disabled with OPCache in order to get optimization enabled. Sure enough. Once I did disable xdebug, pages loaded faster and were more responsive. I did find myself back to square one when the browser was closed and phpmyadmin was opened back up sure enough took 30 - 45 seconds to load and render within the browser. (Chrome 116.0.5845.188 (Official Build) (64-bit) but is updating right now).

Debugging is not so easy to do or set up as I use VS Code to write PHP. I despise any type of "framework" because I really do not see any point in devoting ones skills to a specific "framework" pure PHP is the way to go.

If I knew where to start, I would, PHPMYADMIN, is so scattered, I feel like I am reading a legal document as it makes my head spin.

-Krillin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A problem or regression with an existing feature enhancement A feature request for improving phpMyAdmin
Projects
issues
  
Reproduced
Development

No branches or pull requests

9 participants