You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Stuart MacPherson <ap...@dsl.pipex.com> on 2003/08/21 13:33:55 UTC

Big File Upload => MySQLContentStore and PacketTooBigException

Hi

 

I managed to sort out the problems I was having with Slide inappropriately
creating a collection instead of a file. it seems it does this when there is
a problem with the file handling process, and it doesn't get the full file..

 

Anyway.  I am getting another mysterious error when I try to upload a large
(ish) test file of around 1.53MB.

 

It happily writes away with 2048 sized chunks, until it gets to 1537638 (the
end of the file) when it shows a 1646 sized chunk, and the DB instigates a
SQLException, inside which it says:

 

 

com.mysql.jdbc.PacketTooBigException

 

 

Why is it saying this at the last packet, which is smaller than all the
rest?!  

 

Does anyone know what to do to sort this i.e. do I need to change a DB
setting, or should I do something within Slide?

 

Incidentally, the way my Servlet code handles it (for files this large) is
to write to a temporary area on the server, open an InputStream and then
pass this to the WebdavResource.putMethod() for writing to Slide.  Is this
the best way. or is this in fact the root of my problems above?!  

 

Any suggestions?

 

Many thanks

 

Stuart

 

 


Re: Big File Upload => MySQLContentStore and PacketTooBigException

Posted by laurent belmonte <la...@aliacom.fr>.
I think your problem come from mysql. In my.cnf, you have to add:

set-variable    = max_allowed_packet=xxM
( maximum size of a blob )

 On Thu, 2003-08-21 at 13:33, Stuart MacPherson wrote:
> Hi
> 
>  
> 
> I managed to sort out the problems I was having with Slide inappropriately
> creating a collection instead of a file. it seems it does this when there is
> a problem with the file handling process, and it doesn't get the full file..
> 
>  
> 
> Anyway.  I am getting another mysterious error when I try to upload a large
> (ish) test file of around 1.53MB.
> 
>  
> 
> It happily writes away with 2048 sized chunks, until it gets to 1537638 (the
> end of the file) when it shows a 1646 sized chunk, and the DB instigates a
> SQLException, inside which it says:
> 
>  
> 
> 
> 
> com.mysql.jdbc.PacketTooBigException
> 
>  
> 
> 
> 
> Why is it saying this at the last packet, which is smaller than all the
> rest?!  
> 
>  
> 
> Does anyone know what to do to sort this i.e. do I need to change a DB
> setting, or should I do something within Slide?
> 
>  
> 
> Incidentally, the way my Servlet code handles it (for files this large) is
> to write to a temporary area on the server, open an InputStream and then
> pass this to the WebdavResource.putMethod() for writing to Slide.  Is this
> the best way. or is this in fact the root of my problems above?!  
> 

>  
> 
> Any suggestions?
> 
>  
> 
> Many thanks
> 
>  
> 
> Stuart
> 
>  
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


RE: Big File Upload => MySQLContentStore and PacketTooBigException - SOLVED

Posted by Stuart MacPherson <ap...@dsl.pipex.com>.
Hi Ingo

I just discovered the same solution (in a sun forum), and I amended the
max_allowed_packet entry in the my.ini file.  It worked fine for me, and has
solved my problem, but what I might add is that it only works if you set the
max size to WAY above the expected maximum FILE (yes, the whole thing!)
size... now this might seem a bit odd, and upload overheads alone cannot
account for this... but it works nonetheless.

Thanks for your solution.

Regards
Stuart


-----Original Message-----
From: Ingo Brunberg [mailto:ib@fiz-chemie.de] 
Sent: 21 August 2003 16:14
To: slide-user@jakarta.apache.org
Subject: Re: Big File Upload => MySQLContentStore and PacketTooBigException

I remember someone posted the same problem before. See here:

http://nagoya.apache.org/eyebrowse/ReadMsg?listName=slide-user@jakarta.apach
e.org&msgId=499972

You could try to increase the max_allowed_packet variable in MySQL,
but according to the above message that doesn't help either.

Perhaps you might try to tune other MySQL parameters.

Regards,
Ingo

> Hi
> 
> =20
> 
> I managed to sort out the problems I was having with Slide =
> inappropriately
> creating a collection instead of a file. it seems it does this when =
> there is
> a problem with the file handling process, and it doesn't get the full =
> file..
> 
> =20
> 
> Anyway.  I am getting another mysterious error when I try to upload a =
> large
> (ish) test file of around 1.53MB.
> 
> =20
> 
> It happily writes away with 2048 sized chunks, until it gets to 1537638 =
> (the
> end of the file) when it shows a 1646 sized chunk, and the DB instigates =
> a
> SQLException, inside which it says:
> 
> =20
> 
> =20
> 
> com.mysql.jdbc.PacketTooBigException
> 
> =20
> 
> =20
> 
> Why is it saying this at the last packet, which is smaller than all the
> rest?! =20
> 
> =20
> 
> Does anyone know what to do to sort this i.e. do I need to change a DB
> setting, or should I do something within Slide?
> 
> =20
> 
> Incidentally, the way my Servlet code handles it (for files this large) =
> is
> to write to a temporary area on the server, open an InputStream and then
> pass this to the WebdavResource.putMethod() for writing to Slide.  Is =
> this
> the best way. or is this in fact the root of my problems above?! =20
> 
> =20
> 
> Any suggestions?
> 
> =20
> 
> Many thanks
> 
> =20
> 
> Stuart


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


RE: Big File Upload => MySQLContentStore and PacketTooBigException - SOLVED

Posted by Stuart MacPherson <ap...@dsl.pipex.com>.
Hi Ingo

I just discovered the same solution (in a sun forum), and I amended the
max_allowed_packet entry in the my.ini file.  It worked fine for me, and has
solved my problem, but what I might add is that it only works if you set the
max size to WAY above the expected maximum FILE (yes, the whole thing!)
size... now this might seem a bit odd, and upload overheads alone cannot
account for this... but it works nonetheless.

Thanks for your solution.

Regards
Stuart


-----Original Message-----
From: Ingo Brunberg [mailto:ib@fiz-chemie.de] 
Sent: 21 August 2003 16:14
To: slide-user@jakarta.apache.org
Subject: Re: Big File Upload => MySQLContentStore and PacketTooBigException

I remember someone posted the same problem before. See here:

http://nagoya.apache.org/eyebrowse/ReadMsg?listName=slide-user@jakarta.apach
e.org&msgId=499972

You could try to increase the max_allowed_packet variable in MySQL,
but according to the above message that doesn't help either.

Perhaps you might try to tune other MySQL parameters.

Regards,
Ingo

> Hi
> 
> =20
> 
> I managed to sort out the problems I was having with Slide =
> inappropriately
> creating a collection instead of a file. it seems it does this when =
> there is
> a problem with the file handling process, and it doesn't get the full =
> file..
> 
> =20
> 
> Anyway.  I am getting another mysterious error when I try to upload a =
> large
> (ish) test file of around 1.53MB.
> 
> =20
> 
> It happily writes away with 2048 sized chunks, until it gets to 1537638 =
> (the
> end of the file) when it shows a 1646 sized chunk, and the DB instigates =
> a
> SQLException, inside which it says:
> 
> =20
> 
> =20
> 
> com.mysql.jdbc.PacketTooBigException
> 
> =20
> 
> =20
> 
> Why is it saying this at the last packet, which is smaller than all the
> rest?! =20
> 
> =20
> 
> Does anyone know what to do to sort this i.e. do I need to change a DB
> setting, or should I do something within Slide?
> 
> =20
> 
> Incidentally, the way my Servlet code handles it (for files this large) =
> is
> to write to a temporary area on the server, open an InputStream and then
> pass this to the WebdavResource.putMethod() for writing to Slide.  Is =
> this
> the best way. or is this in fact the root of my problems above?! =20
> 
> =20
> 
> Any suggestions?
> 
> =20
> 
> Many thanks
> 
> =20
> 
> Stuart


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org




Re: Big File Upload => MySQLContentStore and PacketTooBigException

Posted by Ingo Brunberg <ib...@fiz-chemie.de>.
I remember someone posted the same problem before. See here:

http://nagoya.apache.org/eyebrowse/ReadMsg?listName=slide-user@jakarta.apache.org&msgId=499972

You could try to increase the max_allowed_packet variable in MySQL,
but according to the above message that doesn't help either.

Perhaps you might try to tune other MySQL parameters.

Regards,
Ingo

> Hi
> 
> =20
> 
> I managed to sort out the problems I was having with Slide =
> inappropriately
> creating a collection instead of a file. it seems it does this when =
> there is
> a problem with the file handling process, and it doesn't get the full =
> file..
> 
> =20
> 
> Anyway.  I am getting another mysterious error when I try to upload a =
> large
> (ish) test file of around 1.53MB.
> 
> =20
> 
> It happily writes away with 2048 sized chunks, until it gets to 1537638 =
> (the
> end of the file) when it shows a 1646 sized chunk, and the DB instigates =
> a
> SQLException, inside which it says:
> 
> =20
> 
> =20
> 
> com.mysql.jdbc.PacketTooBigException
> 
> =20
> 
> =20
> 
> Why is it saying this at the last packet, which is smaller than all the
> rest?! =20
> 
> =20
> 
> Does anyone know what to do to sort this i.e. do I need to change a DB
> setting, or should I do something within Slide?
> 
> =20
> 
> Incidentally, the way my Servlet code handles it (for files this large) =
> is
> to write to a temporary area on the server, open an InputStream and then
> pass this to the WebdavResource.putMethod() for writing to Slide.  Is =
> this
> the best way. or is this in fact the root of my problems above?! =20
> 
> =20
> 
> Any suggestions?
> 
> =20
> 
> Many thanks
> 
> =20
> 
> Stuart


Re: Big File Upload => MySQLContentStore and PacketTooBigException

Posted by laurent belmonte <la...@aliacom.fr>.
I think your problem come from mysql. In my.cnf, you have to add:

set-variable    = max_allowed_packet=xxM
( maximum size of a blob )

 On Thu, 2003-08-21 at 13:33, Stuart MacPherson wrote:
> Hi
> 
>  
> 
> I managed to sort out the problems I was having with Slide inappropriately
> creating a collection instead of a file. it seems it does this when there is
> a problem with the file handling process, and it doesn't get the full file..
> 
>  
> 
> Anyway.  I am getting another mysterious error when I try to upload a large
> (ish) test file of around 1.53MB.
> 
>  
> 
> It happily writes away with 2048 sized chunks, until it gets to 1537638 (the
> end of the file) when it shows a 1646 sized chunk, and the DB instigates a
> SQLException, inside which it says:
> 
>  
> 
> 
> 
> com.mysql.jdbc.PacketTooBigException
> 
>  
> 
> 
> 
> Why is it saying this at the last packet, which is smaller than all the
> rest?!  
> 
>  
> 
> Does anyone know what to do to sort this i.e. do I need to change a DB
> setting, or should I do something within Slide?
> 
>  
> 
> Incidentally, the way my Servlet code handles it (for files this large) is
> to write to a temporary area on the server, open an InputStream and then
> pass this to the WebdavResource.putMethod() for writing to Slide.  Is this
> the best way. or is this in fact the root of my problems above?!  
> 

>  
> 
> Any suggestions?
> 
>  
> 
> Many thanks
> 
>  
> 
> Stuart
> 
>  
> 
> 
> 


Re: Big File Upload => MySQLContentStore and PacketTooBigException

Posted by Ingo Brunberg <ib...@fiz-chemie.de>.
I remember someone posted the same problem before. See here:

http://nagoya.apache.org/eyebrowse/ReadMsg?listName=slide-user@jakarta.apache.org&msgId=499972

You could try to increase the max_allowed_packet variable in MySQL,
but according to the above message that doesn't help either.

Perhaps you might try to tune other MySQL parameters.

Regards,
Ingo

> Hi
> 
> =20
> 
> I managed to sort out the problems I was having with Slide =
> inappropriately
> creating a collection instead of a file. it seems it does this when =
> there is
> a problem with the file handling process, and it doesn't get the full =
> file..
> 
> =20
> 
> Anyway.  I am getting another mysterious error when I try to upload a =
> large
> (ish) test file of around 1.53MB.
> 
> =20
> 
> It happily writes away with 2048 sized chunks, until it gets to 1537638 =
> (the
> end of the file) when it shows a 1646 sized chunk, and the DB instigates =
> a
> SQLException, inside which it says:
> 
> =20
> 
> =20
> 
> com.mysql.jdbc.PacketTooBigException
> 
> =20
> 
> =20
> 
> Why is it saying this at the last packet, which is smaller than all the
> rest?! =20
> 
> =20
> 
> Does anyone know what to do to sort this i.e. do I need to change a DB
> setting, or should I do something within Slide?
> 
> =20
> 
> Incidentally, the way my Servlet code handles it (for files this large) =
> is
> to write to a temporary area on the server, open an InputStream and then
> pass this to the WebdavResource.putMethod() for writing to Slide.  Is =
> this
> the best way. or is this in fact the root of my problems above?! =20
> 
> =20
> 
> Any suggestions?
> 
> =20
> 
> Many thanks
> 
> =20
> 
> Stuart


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org