Question How to increase the maximum attachment size
Answer If you try to upload a large file as an attachment, you might receive an error. This is caused by two limits:
  • Some database servers have a limit on the maximum size of an action. For example, a default mysql installation permits only 1 megabyte statements to be executed. You can increase this limit if you have access to the server. For mysql, see http://dev.mysql.com/doc/mysql/en/Packet_too_large.html .
  • XWiki has a maximum attachment size of about 10 megabytes. You can increase this limit by following the next steps:
    • edit the XWiki.XWikiPreferences class and add a NumberProperty field of type long, named upload_maxsize; if the field already exists, you can skip this step
    • edit the XWiki.XWikiPreferences object and specify the desired maximum attachment size (in bytes)
Version 1.8 last modified by Vincent Massol on 12/12/2007 at 01:38

Comments 6

tobias schaub | 05.09.2007 at 03:04 PM
i try it at the localhost, but it doesn´t work. can someone add a screenshot? thanks

Charles Vissol | 07.09.2007 at 07:00 PM
I have the same problem. Who can help us ?

Thanks


wiki boy | 03.10.2007 at 02:44 PM
i tried this but it doesn't work, there is still the same message that said max attachment size is 10M. is this solution working with all version ? with wich one does it work ?

plz help me i need to use bigger attachment.


John Reid | 19.11.2007 at 05:21 PM
I tried this method and it doesnt work. What versions is this solution successful?

I am currently using xwiki RC1.1. Please can you provide a solution. I need to upload a bigger attachment.

Many Thanks, John


otuser1 | 20.11.2007 at 03:31 PM
I also has tried this medthod on Xwiki 1.2M2 and it failed.

After adding and setting upload_maxsize, I ran into the "Java Heap Space Out Of Memory Exception !" while trying to upload a 20MB pdf file. Increasing the available memory via "set JAVA_OPTS=-Xmx512m" resulted in a long wait and finally system crash when java suck up all the system memory.

Is there a less resource-intensive way for Xwiki to store attachment?

Thanks


Pedro Furtado | 12.12.2007 at 01:38 AM
I have the same problem. Tried it with XWiki 1.1.2 and still receive the error message "max attachment size is 10MB".

I also ran into the "Java Heap Space Out Of Memory Exception!". My XWiki instalation is the default one with the jetty container.

The database biggest file as 2,4GB (mostly because I have many 6-7MB attachments) and I have to set JAVA_OPTS=-Xmx1280m for it to load XWiki.

I repeat otuser1 question: Is there a less resource-intensive way for Xwiki to store attachments?

Thank you for your reply

Attachments 0

No attachments for this document

Creator: Sergiu Dumitriu on 2007/03/06 10:38
This wiki is licensed under a Creative Commons license
1.5.2.12758