Link to home
Start Free TrialLog in
Avatar of David Kostraba
David Kostraba

asked on

What would cause phpMyAdmin to be so slow?

I have a website using Drupal 7.54 along with a database. I typically use phpMyAdmin to access the database. It usually takes about 4 minutes just to get to the main page on phpMyAdmin after logging in; viewing the databases and tables takes a long time to load as well. Since I am using Drupal, there is going to be a lot of tables stored (tables are innoDB). I have used a module to clear the revision tables, tried setting $cfg['MaxExactCount'], changing the "host" value from "localhost" to "127.0.0.1", updating phpMyAdmin, and changing the theme to its original display. What am I missing? What am I doing wrong? Any help will be greatly appreciated.

Notes:

Database server Server: Localhost via UNIX socket Server type: Percona Server Server version: 5.6.32-78.1-log - Percona Server (GPL), Release 78.1, Revision 8bb53b6 Protocol version: 10 Server charset: UTF-8 Unicode (utf8) Web server

Apache Database client version: libmysql - 5.6.32-78.1 PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation PHP version: 5.6.29 Version Information: 4.7.3

Also, lately I have been getting the error - mysqli_real_connect(): (HY000/1040): Too many connections, after I change the theme to its original display.
Avatar of HainKurt
HainKurt
Flag of Canada image

check your "my.cnf" file for "max_connections".
what do you have here?

[mysqld]
set-variable=max_connections=???

Open in new window


I would say, "maybe you have some script with a loop and you open connections and never closes"
but you say, same thing happens with phpMyAdmin as well...

also, which version of phpMyAdmin are you using? if not the latest (4.7.4 as of now), update it...

maybe you have 2 different issues here:
- phpMyAdmin - updating to latest may fix
- app - you should check all connection leaks / increase max connections / check default database configuration for the app...
Avatar of Sapnaz
Sapnaz

A database driven websites may load slowly due to too many processes having to be performed before returning the information to the browser and any errors in plugins may cause loading slowly. You have to use caching for the database driven website to improve the speed.

Using Drupal's built-in caching is probably the easiest way to improve performance on your site. However, some users that are new to Drupal miss out on this feature because it’s turned off by default. To enable caching for your site, go to the 'Performance' settings under the ‘Configuration’ tab.

Another great way to improve your site’s performance is the Boost module https://www.drupal.org/project/boost .Varnish Cache is another solution that can supercharge the performance of your site https://varnish-cache.org/ .

You can also remove unwanted plugins, if any. Any plugin serving dynamic content adds to page processing time. Also, I suggest that you optimize the database and also limit the number of posts and images per page to improve the performance. Also, you have to optimize the database on regular basis and upgrade the themes/plugins/application to the latest version when the upgrade is available.

You can also refer https://www.drupal.org/docs/7/managing-site-performance-and-scalability/optimizing-drupal-to-load-faster-server-mysql to speed up the website .

mysqli_real_connect(): (HY000/1040): Too many connections - This is due to max database connection error which can be due to plugins or themes.
Avatar of David Favor
To know for sure, you'll likely have to refer to your LAMP Stack logs.

Any other approach is just guessing.

Could be exceeding connections... or swapping... or PHP Opcache incorrectly configured... or MySQL/MariaDB misconfigured.

Use the logs Luke...

In correctly configured + tuned LAMP Stacks phpMyAdmin should take an eyeblink of time to login + reach dashboard page.

Slowdowns relate to your hosting environment.

If you're running on a dedicated server, you can fix this.

If you're running on any other type of setup... you'll probably have to just live with the slowness.

You can try opening a ticket with your hosting/provisioning company + this rarely produces useful results.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.