Solved

java.sql.SQLException: Packet for query is too large (4739923 > 1048576)

Posted on 2013-12-02
6
1,162 Views
Last Modified: 2014-06-06
Hi,

I'm wondering why I'm still getting this error in my PHPStorm Database connection properties after I updated my.cnf and set the max_allowed_packet variable to 75M. I restarted MySQL and I executed the command:
mysql> select @@max_allowed_packet;

and I get the correct 73M.

So, what's the problem still?
0
Comment
Question by:Victor Kimura
  • 4
6 Comments
 
LVL 16

Expert Comment

by:Valeri
ID: 39689832
looks like the files you are trying to upload are still more than 75M. change it for example to 200M and try again.
Another reason coud be that mySQL needs restart after this change.
0
 

Author Comment

by:Victor Kimura
ID: 39690215
This is the error I get. I have more than the 4M stated in the error. Also, mentioned in the original post that I restarted MySQL.

Connection to Data Source failed
java.sql.SQLException: Packet for query is too large (4739923 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.

Any other possibilities?
0
 
LVL 26

Expert Comment

by:dpearson
ID: 39691467
I'm not much of a DB specialist but the docs say that there are 2 variables that control this - one in the client and the other in the server:
http://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html

So the PHP client may also need to define this max packet size when opening the connection. (I have no idea how you set that in PHP - but in Java I'd look at the URL used to open the database connection).

Also it says:
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.

Doug
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:Victor Kimura
ID: 39706032
Hi fellows,

I think it's a Jetbrains PHPStorm issue. I'm going to try and update to the latest build. I contacted tech for Jetbrains and that's what they said. I'll find out soon enough. Thank you for the feedback. I'll post here and respond if the update to the latest build works or not. =)
0
 

Accepted Solution

by:
Victor Kimura earned 0 total points
ID: 40104256
Yes, this question is resolved by upgrading the to the latest PHPStorm verison 7.1.x (currently as of June 1, 2014).
0
 

Author Closing Comment

by:Victor Kimura
ID: 40116725
Upgrading to the latest IDE resolved the problem. God bless<><
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Android studio getdrawable(int) is deprecated 4 43
showing numeric numbers 2 33
nextBoolean(double p) for Random class 3 35
use lov values 2 33
As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now