Comments

marcingy’s picture

Category: bug » support
bassplaya’s picture

I suspect that it has to do with my MAMP installation but I didn't change anything there for a very long time. Maybe someone understands the issue by looking at the code that I got when I increased the memory_limit from 96MB to 192MB:

Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT * FROM {menu_links} WHERE menu_name = :menu_name AND module = :module AND link_path = :path; Array ( [:menu_name] => management [:module] => system [:path] => admin ) in toolbar_get_menu_tree() (line 279 of /Users/GraphicDesign/Sites/www.sandbox/modules/toolbar/toolbar.module).

Additional

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:260:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT * FROM {menu_links} WHERE menu_name = :menu_name AND module = :module AND link_path = :path; Array ( [:menu_name] => management [:module] => system [:path] => admin ) ";s:9:"%function";s:23:"toolbar_get_menu_tree()";s:5:"%file";s:78:"/Users/GraphicDesign/Sites/www.sandbox/modules/toolbar/toolbar.module";s:5:"%line";i:279;s:14:"seve...} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://www.sandbox/?q=admin/structure/types/add [:db_insert_placeholder_7] => http://www.sandbox/?q=admin/structure/types [:db_insert_placeholder_8] => 127.0.0.1 [:db_insert_placeholder_9] => 1319513599 ) in dblog_watchdog() (line 157 of /Users/GraphicDesign/Sites/www.sandbox/modules/dblog/dblog.module).

bassplaya’s picture

just to provide more information: I can create new fields but I can't create new content types.
Maybe I should export my content types and see if I have the same problem in a new site.
How can I export my fields in D7?

muschpusch’s picture

Status: Active » Closed (won't fix)

There is something wrong with your mysql configuration. Raising php max memory won't fix it.

General error: 2006 MySQL server has gone away

I think acquia has an preconfigured apache / mysql environment which you can test. Otherwise try it in the mamp forums!

lucsan’s picture

Same issue with a new build on xampp, Disabling the core menu module allows content types to be created.

Umayal’s picture

Title: can't add content types any longer » Individual content types can have different fields, behaviors, and permissions assigned to them.
Version: 7.8 » 7.12

I am using Drupal 7. I have 5 custom content type.
I want to add new custom content type.
when i click the add content type it show the following error

Individual content types can have different fields, behaviors, and permissions assigned to them.

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 12350718 bytes) in /xxxxx/includes/database/database.inc on line 2139

fromtheindia’s picture

Version: 7.12 » 7.22
Status: Closed (won't fix) » Active

I am also facing the same problem! Can anyone help??

Thanks in advance.

ylys’s picture

The same error when: I click "Add Content Type": admin/structure/types/add
Drupal 7.28

kernow_semaj’s picture

Issue summary: View changes

I had the same issue. disabling the core menu module cause a WSOD.
I increased the MySQL value "max_allowed_packet" from the default 16M to 64M in the MySQL config - "/etc/mysql/my.cnf" in my case.

max_allowed_packet = 64M

Restarted MySQL and that solved the issue for me.

dcam’s picture

Status: Active » Closed (fixed)

@kernow_semaj Thank you for providing your solution!

For anyone else who comes across this issue, you can also try increasing the memory_limit in your php.ini file and restart your web server. If that doesn't work, then there is probably a memory leak somewhere in your site's code. Back up your site's database and try disabling modules and see if you can isolate the problem.

If nothing works, do not re-open this issue. Start a new issue, or better yet don't post in the core issue queue at all. This is not a support channel. It's meant for people who want to fix bugs or add features to Drupal. Very few people attempt to provide support here. IRC or the support forum are better places to get support.

zakmail007’s picture

I had same issue and i was working on XAMPP,
I did given changes in XAMPP\mysql\bin\my.ini file
on line number #36 replaced size from max_allowed_packet = 1M to max_allowed_packet = 64M
And restart mysql.