High Load CPU when using PhpMyAdmin


It’s the irst time that i use Virtualmin, I’m a newbie but i ask for help only because i tried many solutions for my issue and i have always the same thing.

I really hop that someone can help me here.

I have (Debian 6.0 LAMP - 64 bit) as OS.

And here is the configuration of my Deticated Server :

Intel® Core™ i7-2600 Quadcore
Hard disks 2 x 3 TB SATA 6 Gb/s HDD
7200 rpm (Software-RAID 1)
NIC 1 Gbit OnBoard
connected at 100 Mbit

I installed Virtualmin as clean install (new installed OS) and i only add PhpMyadmin latest version.

Everything work fine and even it’s the first time for me with virtualmin i did not have any problem with the configuration.

The issue is :
When i try to import files by PhpMyAdmin (.sql files with 730K size each) i got the error (in log errors)
PHP Fatal error: Allowed memory size of 33554432 bytes exhausted

And when i run (top) the memory is only at 0.1% BUT the CPU usage is at 100% and remain like that

So i changed the ‘memory_limit’ in files :

I increase until 1024M.

Now i get the ‘timeout’ warning message and still my databse not imported, and evrey time i try to import again the PhpMyAdmin page remain loading then i get a blank page, and during the operation the CPU is at 100% when i run the ‘top’ command.

Did i miss something ?
Did my hosting provider the cause ?

Please, I’m waiting some advices
Waiting for your answers.
Best Regards.


Yeah, it sounds like the scripts you’re importing require a higher memory limit – so increasing PHP’s memory_limit as you did is a good step.

Since you’re receiving a timeout as well – that suggests it may require more time to process the scripts than it’s setup to allow.

You can change that by either manually setting the “max_execution_time” to a higher value (it’s set to 30 seconds by default), or you could go into Server Configuration -> Website Options, and set “Maximum PHP script run time” in there.


Hello andreychek.

Thank you for your answer.

I forget to say that i changed max_execution_time too (i put 1800) i know that is too much, but i did it to see the results.

BUT : always the same thing.

In fact : i did not use an unknown script, i use the official PhpMyAdmin.

The server go to 100% CPU, when i only want to import my data to my database (MySql), the files are too small the size is about 730 Kb.

Did you have any suggestions ?
Thank you again.

Are you using FCGId for the virtual server containing PhpMyAdmin? If so, you’ll need to adjust the resource limit parameters under “Services / PHP 5 Configuration” for the virtual server in question, since with FCGId every server has its own set of PHP ini files.

The 100% CPU is possible, even if the file is small, depending on how PhpMyAdmin goes about the import. Maybe it does that inefficiently. The efficient way would be using the shell and calling “mysql … < script.sql” directly. :slight_smile: