james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Roebuck <stuart.roeb...@adolos.co.uk>
Subject Re: Packet is larger than max_allowed_packet from server configurationof 1048576 bytes
Date Thu, 09 May 2002 18:59:03 GMT
Thank you again for all the useful suggestions.

I haven't updated James to the latest CVS, but I've updated my mysql 
driver and relaunched mysql with the command line:

	safe_mysqld -O max_allowed_packet=8M --user=mysql

I've since received an email that previously killed the system.

Thanks again,


On Thursday, May 9, 2002, at 03:11 PM, Noel J. Bergman wrote:

>> its not the driver, its actually the default MySQL configuration (in
>> /etc/my.cnf)
> It is both.  There are limiting bugs in the version of the mmmysql 
> driver
> bundled with James (e.g., "Fixed ArrayIndexOutOfBounds when sending 
> large
> BLOB queries -- Max size packet was not being set"), and depending upon 
> your
> mysql build, it is likely that you also need to add:
> 	set-variable = max_allowed_packet=16M
> to the [mysqld] section of the global configuration file, e.g., 
> /etc/my.cnf,
> or change the startup statement for mysqld to set max_allowed_packet.
> For those who care, the documentation for max_allowed_packet says: "This
> value by default is small, to catch big (possibly wrong) packets.  You 
> must
> increase this value if you are using big BLOB columns. It should be as 
> big
> as the biggest BLOB you want to use. The protocol limits for
> max_allowed_packet is 16M in MySQL 3.23 and 4G in MySQL 4.0."
> If you expect a LOT of large packets, you might want to be aware of the
> following: "For example, if you have BLOB values that contain up to 16M 
> of
> data, you must have a communication buffer limit of at least 16M (in 
> both
> server and client).  The client's default maximum is 16M, but the 
> default
> maximum in the server is 1M. You can increase this by changing the 
> value of
> the max_allowed_packet parameter when the server is started. The MySQL
> server shrinks each communication buffer to net_buffer_length bytes 
> after
> each query. For clients, the size of the buffer associated with a 
> connection
> is not decreased until the connection is closed, at which time client 
> memory
> is reclaimed."
> Caveat: "You can also get strange problems with large packets if you are
> using big blobs, but you haven't 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 safe_mysqld script and restart mysqld."
> 	--- Noel
> --
> To unsubscribe, e-mail:   <mailto:james-dev-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:james-dev-
> help@jakarta.apache.org>

            Public Key - 1024D/88DD65AF 2001-11-23 Stuart Roebuck (Adolos)
      Key fingerprint = 89D9 E405 F8B1 9B22 0FA2  F2C1 9E57 5AB1 88DD 65AF
Stuart Roebuck                                  stuart.roebuck@adolos.com
Systems Architect                             Java, XML, MacOS X, XP, 
ADOLOS                                           <http://www.adolos.com/>

To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>

View raw message