List:MySQL and Java« Previous MessageNext Message »
From:Mark Matthews Date:February 8 2003 2:34pm
Subject:Re: max_allowed_packet stuck at 65536 in JDBC/MYSQL?
View as plain text  
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

raffi@stripped wrote:
> Hi all.
> We're seeing something strange here in a situation with MySQL 3.23.5x 
> and the mm.mysql-2.0.4 driver. There is a large query going through 
> (about 1 MB in size) which is being stopped with an sql error that says ...
> 
> Packet is larger than max_allowed_packet from server configuration of 
> 65536 bytes ...
> 
> We've checked and mysqld reports that the max_allowed_packet is set to 
> 16M ... which is coming from the my.ini file (changing it doesnt seem to 
> solve the problem). The code also seems to be setting the 
> max_allowed_packet variable for the jdbc driver with something like...
> 
> Properties dbprops = new Properties();
> dbprops.setProperty("max_allowed_packet", "2048000");
> Connection c = 
> DriverManager.getConnection(url+"?user="+username+"&password="+password, 
> dbprops);
> 
> yet the error still occurs claiming (as you can see) that the 
> max_allowed_packet is set to 65536.
> 
> Should I check myself in for a brain scan or is it simpler than that?
> I cant seem to figure out any way to verify that the driver properties 
> being set are actually in effect (seems like they are not!) like I can 
> with mysqld by connecting with the mysql client and typing SHOW VARIABLES;.
> 
> Any help is appreciated.
> 
> Thanks!

It seems that you're using a very old version of the JDBC driver that 
doesn't set this automatically. In the future, if you have problems that 
you send to the e-mail list (or to me), it helps immensely if you name 
the versions of _all_ pieces that you use (JVM, JDBC driver, server, OS).

In any case, you will be better off using Connector/J 2.0.14 or 3.0.5 
from http://www.mysql.com/products/connector-j/

	-Mark


- -- 
MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/

For technical support contracts, visit https://order.mysql.com/?ref=mmma

     __  ___     ___ ____  __
    /  |/  /_ __/ __/ __ \/ /  Mark Matthews <mark@stripped>
   / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
  /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
         <___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+RRWRtvXNTca6JD8RArkoAJ916v6iaORjnx7A85878F+zfSFy0wCgqgVM
xenu899DOTkXvcQ7pwyt6Jk=
=ZhS7
-----END PGP SIGNATURE-----

Thread
Handling Huge Result SetsPeter Schäfer30 Jan
  • Re: Handling Huge Result SetsMark Matthews30 Jan
RE: Handling Huge Result SetsPeter Schäfer30 Jan
  • Re: Handling Huge Result SetsMark Matthews30 Jan
    • max_allowed_packet stuck at 65536 in JDBC/MYSQL?raffi@dcit.com6 Feb
      • Re: max_allowed_packet stuck at 65536 in JDBC/MYSQL?Mark Matthews8 Feb
RE: Handling Huge Result SetsPeter Schäfer3 Feb
  • RE: Handling Huge Result SetsShankar Unni3 Feb
RE: Handling Huge Result SetsUdkik4 Feb
  • Re: Handling Huge Result SetsJeremy Zawodny4 Feb
    • RE: Handling Huge Result SetsUdkik4 Feb