简体   繁体   中英

phpMyAdmin hangs server by doing a COUNT(*) when going to “Browse”

I have a very large table (~115 million rows). When I click it in phpMyAdmin everything blows up. By doing a SHOW PROCESSLIST; I can see that it's because phpMyAdmin has tried to execute the following query:

SELECT COUNT(*) FROM `friend_map`.`connections`

Since this is an innoDB table this requires a table scan and the server errors out before returning.

It gives the error:

Error in Processing Request
Error code: 504
Error text: Gateway Timeout

I have to manually kill the mysql process or the entire database remains unresponsive.

Is there a way to tell phpMyAdmin not to execute this query?

Edit: I should probably also note that I'm in the middle of a server migration. This worked fine with phpMyAdmin 3.5.1 but now I've switched to new servers and this error is happening on phpMyAdmin 4.1.3.

This appears to be an open issue with phpMyAdmin 4.x. More details are here: http://sourceforge.net/p/phpmyadmin/bugs/4027/?page=0

I was able to fix this by adding $force_exact = false; to line 573 of libraries/Table.class.php.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM