Taxonomy menu with a large list of terms I want to display a list of terms and child terms using Taxonomy menu,my list is very large ( more than 2000 terms), and Im getting this error:

Additional uncaught exception thrown while handling exception.
Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT * FROM {system} WHERE type = &amp;#039;theme&amp;#039; OR (type = &amp;#039;module&amp;#039; AND status = 1) ORDER BY weight ASC, name ASC; Array ( ) in system_list() (line 165 of C:\wamp\www\Books\includes\module.inc).
Additional

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] =&amp;gt; theme_registry:runtime:adaptivetheme_admin:cache ) in lock_may_be_available() (line 167 of C:\wamp\www\Books\includes\lock.inc).
Uncaught exception thrown in session handler.

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in _drupal_session_write() (line 206 of C:\wamp\www\Books\includes\session.inc).
Uncaught exception thrown in shutdown function.

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] =&amp;gt; 14337154844f4e188d884c54.86419408 ) in lock_release_all() (line 269 of C:\wamp\www\Books\includes\lock.inc).


Is this because Taxonomy menu can not handle a large amount of terms?
Yes, this error usually is related to a large size of data, so database can't handle such sizes due the given limits and it fails, because the server timed out and closed the connection.

To fix it, you need to increase value of max_allowed_packet in your my.cnf (e.g. ~/.my.cnf) under [mysqld] section, e.g.

[mysqld]
max_allowed_packet=256M


See: B.5.2.9 MySQL server has gone away for more detailed information.

Another thing is that in this particular case it happens in shutdown function (which is after Drupal finished the processing of the site), therefore it could be related to some cron or debugging tasks.