Got a packet bigger than 'max_allowed_packet' bytes

gerwim

New Member
Messages
6
Reaction score
0
Points
0
Hi there,

So I'm trying to upload an image in my SQL database, although I get this error. 30KB image works, but a 500KB one fails.
Got a packet bigger than 'max_allowed_packet' bytes

This means that you are not able to upload files bigger than X size, or import databases greater than X size.

Can this 'max_allowed_packet' be increased? I'm on the Starka server.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
System settings such as max_allowed_packet that set limits are very unlikely to be changed (unless during a major server upgrade) as increasing them can let just a few users bring the shared servers to a crawl.

Rather than storing images in a database, you can store them in the filesystem and store paths in the DB. This has other benefits beyond getting around MySQL's maximum packet size.
 

gerwim

New Member
Messages
6
Reaction score
0
Points
0
Hi misson,

Thanks for your reply. As I hadn't any hopes up that it would be increased, I have already done exactly as you said.

Thanks anyway.


Gerwim
 
Top