[Phpmyadmin-devel] Charsets overview too memory hungry?

Marc Delisle marc at infomarc.info
Wed Aug 25 14:03:12 CEST 2010


Michal Čihař a écrit :
> Hi all
> 
> watching demo server error logs gives me impression that something is
> wrong with charsets handling:
> 
> PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted
> (tried to allocate 10199 bytes)
> in master-config/libraries/mysql_charsets.lib.php
> on line 129#012
> 
> On more investigation, it seems to happen almost every time with
> tbl_create.php. To be honest, I fail to see what could consume so much
> memory there.

Michal,
With the following patch on master I traced peak memory usage when 
creating a table. Let's say I ask for 10 columns; then on my server the 
trace shows an increasing peak usage, from 1773912 (first column) to 
2014112. This is with PHP 5.3.3, mysqli and mysqlnd.

Can you try on your server?

diff --git a/libraries/mysql_charsets.lib.php 
b/libraries/mysql_charsets.lib.php
index db31ece..acaeba4 100644
--- a/libraries/mysql_charsets.lib.php
+++ b/libraries/mysql_charsets.lib.php
@@ -137,7 +137,7 @@ function PMA_generateCharsetDropdownBox($type = 
PMA_CSDROPDOWN_COLLATION,
          }
      }
      $return_str .= '</select>' . "\n";
-
+echo 'trace (' . memory_get_peak_usage() . ')';
      return $return_str;
  }




-- 
Marc Delisle
http://infomarc.info




More information about the Developers mailing list