Everything has been fine so far untill I decided to allow mutiple selections for a vocabulary then I Got the following error. I have all rights into the DB

user warning: Got a packet bigger than 'max_allowed_packet' bytes query: UPDATE cache_views SET data = 'a:4:{s:6:\"tables\";a:149:{s:24:\"node_data_field_location\";a:5:{s:4:\"name\";s:22:\"content_field_location\";s:4:\"join\";a:2:{s:4:\"left\";a:2:{s:5:\"table\";s:4:\"node\";s:5:\"field\";s:3:\"vid\";}s:5:\"right\";a:1:{s:5:\"field\";s:3:\"vid\";}}s:6:\"fields\";a:1:{s:20:\"field_location_value\";a:9:{s:4:\"name\";s:31:\"Text: Location (field_location)\";s:10:\"addlfields\";a:0:{}s:8:\"sortable\";b:1;s:13:\"query_handler\";s:33:\"content_views_field_query_handler\";s:7:\"handler\";a:2:{s:33:\"content_views_field_handler_group\";s:21:\"Group multiple values\";s:35:\"content_views_field_handler_ungroup\";s:28:\"Do not group multiple values\";}s:6:\&quo in /home/virtual/site24/fst/var/www/html/includes/database.mysql.inc on line 172.

Comments

vm’s picture

A.2.9. Packet too large
A communication packet is a single SQL statement sent to the MySQL server or a single row that is sent to the client.

In MySQL 3.23, the largest possible packet is 16MB, due to limits in the client/server protocol. In MySQL 4.0.1 and up, the limit is 1GB.

When a MySQL client or the mysqld server receives a packet bigger than max_allowed_packet bytes, it issues a Packet too large error and closes the connection. With some clients, you may also get a Lost connection to MySQL server during query error if the communication packet is too large.

Both the client and the server have their own max_allowed_packet variable, so if you want to handle big packets, you must increase this variable both in the client and in the server.

If you are using the mysql client program, its default max_allowed_packet variable is 16MB. That is also the maximum value before MySQL 4.0. To set a larger value from 4.0 on, start mysql like this:

mysql> mysql --max_allowed_packet=32M

That sets the packet size to 32MB.

The server's default max_allowed_packet value is 1MB. You can increase this if the server needs to handle big queries (for example, if you are working with big BLOB columns). For example, to set the variable to 16MB, start the server like this:

mysql> mysqld --max_allowed_packet=16M

Before MySQL 4.0, use this syntax instead:

mysql> mysqld --set-variable=max_allowed_packet=16M

You can also use an option file to set max_allowed_packet. For example, to set the size for the server to 16MB, add the following lines in an option file:

[mysqld]
max_allowed_packet=16M

Before MySQL 4.0, use this syntax instead:

[mysqld]
set-variable = max_allowed_packet=16M

It's safe to increase the value of this variable because the extra memory is allocated only when needed. For example, mysqld allocates more memory only when you issue a long query or when mysqld must return a large result row. The small default value of the variable is a precaution to catch incorrect packets between the client and server and also to ensure that you don't run out of memory by using large packets accidentally.

You can also get strange problems with large packets if you are using large BLOB values but have not given mysqld access to enough memory to handle the query. If you suspect this is the case, try adding ulimit -d 256000 to the beginning of the mysqld_safe script and restarting mysqld.

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

llizards’s picture

That's got it !!! thanks for your help... other than memory is there something I would have setup wrong in cck or Drupal that causes this?

I have several Drupal Sites and this is the first one still in beta phase that I have had that issue.

vm’s picture

I don't see in your warning where CCK or Drupal is mentioned.

it's happening with a views_cache table
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

llizards’s picture

I am running views but made no changes recently to it

vm’s picture

evidentally the changes you made forced a cache_views update ?

This table can be truncated to see if the warning is repeatable and work on narrowing down what the root of the evil is.

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

llizards’s picture

thanks again for your quick help

kay_v’s picture

if you're using MAMP, give the following a try:

  1. copy /Applications/MAMP/Library/share/mysql/my-small.cnf
  2. name it (and put it in directory) as /Applications/MAMP/db/mysql/my.cnf
  3. change 'max_allowed_packet = 1M' to the required value
  4. in the MAMP application, click stop servers, then restart them

and of course grab a copy of The Definitive Guide to Drupal 7 for more tips on setting up your development environment, among other topics.

ownsourcing.com - Drupal training