2

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 = 'theme' OR (type = 'module' 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] => 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] => 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?

2
  • I can't tell if you're on drupal 6 or 7, but in drupal 6 the taxonomy_get_tree function is a really taxing function when you have a lot of terms, so it doesn't necessarily have anything to do with taxonomy menu.
    – dysrama
    Feb 29 '12 at 22:59
  • I was using drupal 7 in localhost(wampserver), I have reinstalled my drupal site using XAMPP with Zend and things goes better. However, Taxonomy menu still take a long time..to display terms.
    – Nizarnav
    Mar 2 '12 at 21:31
0

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.