Servlets , Commons FileUpload , MySQL and large file trouble
Hey Guys,
I am trying to upload files from a servlet handled page using jakarta commons file upload library into MySQL. I could not upload a 40M file . I can upload smaller size, 1-5 M , haven't tried 10-20 M sizes. MySQL variable for size is set to 64M.
any clues would help a lot !
thanks,
AZ
[328 byte] By [
azaidi1a] at [2007-11-27 9:16:00]

> sabre, what about changing the
> max_allowed_packet value?
I'm not sure this would help since we don't know what the symptoms of the failure are. I suspect that the OP is first trying to load the whole file into memory before writing any of it to MySQL.
If you look at the MySQL manual you see
"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."
so just changing the client may not work anyway.
Thanks for the replies guys.
So I changed MySQL variable for packet size to 64M. On my client I am using servlets, specifically, the jakarta commons fileupload library. I am guessing there is a way to change commons threshold , do I change that too ?
My MySQL variable was already 64M before I started testing large files.