Re: [xwiki-users] [Error]: Java heap memory error on adding large attachment

2008-02-18 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team
Pavel wrote:
 Ricardo,

 I did not test the issue on different app servers and databases. 
 However, underlying reasons for this out of memory make me strongly 
 believe that changing DB/AS will make little or no difference.

 Pavel


Hi Pavel,

Based on your message (almost your message by itself)...

http://www.xwiki.org/xwiki/bin/view/FAQ/HowToSolveAJavaHeapMemoryError

I hope others improves it.

Best,

Ricardo

-- 
Ricardo Rodríguez
Your EPEC Network ICT Team

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [Error]: Java heap memory error on adding large attachment

2008-02-17 Thread Pavel
Ricardo,

I did not test the issue on different app servers and databases. However,
underlying reasons for this out of memory make me strongly believe that
changing DB/AS will make little or no difference.

Pavel

On Feb 17, 2008 12:09 AM, [Ricardo Rodriguez] Your EPEC Network ICT Team 
[EMAIL PROTECTED] wrote:

 Pavel wrote:
  Here is my version of what happens in QA.
 
  * What does out of memory error mean?
- Java virtual machine (which runs tomcat which runs xwiki) has run
  out of heap space and cannot allocate anything anymore.
 
  * Is it related to MySQL packet size?
- No
 
  * Why this error happens?
- Because application needs more memory than JMV is allowed to use.
 
  * How is that related to attachments?
- The way xwiki handles attachments is, well, not perfect.
Somewhat related thread is
  http://lists.xwiki.org/pipermail/users/2007-November/009362.html
 
  * So what can you do?
- a) Use -Xms and -Xmx java parameters to increase heap size.
- b) Implement and contribute to XWiki effective attachment handling.
 
  * What are the -Xms and -Xmx params?
- -Xms tells java the initial heap size, -Xmx controls max size. The
  latter is of special interest in this case and can be increased.
 
  Pavel

 Hi Pavel,

 Do you know if this heap size issue happens just working with Tomcat as
 servlet container or it is generalizable to other application servers?
 It could be advisable clarify that this FAQ applies just to XWiki
 running on a Tomcat/MySQL server.

 I would add a link to heap, something as
 http://dictionary.zdnet.com/definition/heap.html. I am not a programmer,
 so I do need this kind of help to know what is happening with my
 installation :-)

 As per the CATALINA_OPTS or JAVA_OPTS variables, it would be great to
 have a confirmation, but by tracking their values along catalina.sh and
 startup.sh I reach the same conclusion you presented. FAQs are wiki
 entries, so anybody can modify them! I would add some
 sample lines as (this apply to Unix-based systems, could you add that
 applying to Windows ones?)...

 * to be included in a script calling startup.sh: both variables will be
 passed in to the startup process.

 export CATALINA_OPTS=-Xmx512m -Xms512m
 export JAVA_OPTS=-Xmx512m -Xms512m

 I am guessing it is of course possible to add this values within
 catanina.sh or startup.sh, but I do prefer don't touch these files if
 possible.

 Cheers,

 Ricardo


 --
 Ricardo Rodríguez
 Your EPEC Network ICT Team

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




-- 
Best regards,
Pavel
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [Error]: Java heap memory error on adding large attachment

2008-02-16 Thread Dowson_Jim
Ricardo Rodriguez wrote:

[EMAIL PROTECTED] wrote:
 An MS Word document. 

 The error also happened with a 6.5 MB zip file - so the xwiki limit
of
 10MB may not be the issue (although documents larger than the alleged
 1MB MySQL limit have been successfully uploaded). 

Thus, the problem may arise from the amount of memory available for 
Java. What servlet container are you using? I've seen this error here 
running Tomcat. You can increase this amount by passing this parameter 
-Xmx256m -Xms256m (in this case 256Mb will be the new amount of 
available memory) at startup time.

I'll have to check with the lab folks - I believe they started with the
1.2M2 Windows complete build, then upgraded to 1.2RC2.

I will let you know after I have heard from them. 

I wanted to make the changes one step at a time to isolate the root
cause.

So, you have to shutdown your servlet container, modify some script to 
startup.sh, catalina.sh or whatever your are using to launch Tomcat, to

add this paramenters to CATALINA_OPTS or JAVA_OPTS. I have not a clear

idea about what is the right variable to be modified. Any feedback will

be really welcome.

 Here is the script I am using here to start Tomcat:

mire:/home/webmaster/bin # cat start_tomcat6
#!/bin/sh
export CATALINA_HOME=/usr/share/tomcat-6.0.10
export JAVA_HOME=/usr/share/java/jre-1.6.0_01
export JRE_HOME=/usr/share/java/jre-1.6.0_01
export CATALINA_OPTS=-Xmx512m -Xms512m
export JAVA_OPTS=-Xmx512m -Xms512m
$CATALINA_HOME/bin/startup.sh

As per your question about the need of restarting XWiki so that the new

configuration values become effective. Yes, this is required. xwiki.cfg

is read at deployment time. So if you have any utility that allow you
to 
restart just one application, you are a lucky person :-) If you have
not 
it, just restart the servlet container.

I expected that to be the case - and the FAQ should be updated to
reflect that 
(I didn't consider myself as authoritative, so I didn't want to edit the
entry). 

I would also suggest that the error code (Java ) be added to the
text as well.

I am sure there are people out there with a much more in depth
knowledge 
about this issue. But this has helped me. I hope it could be useful for

you as well.

Perhaps, but by speaking, you're the most effective person ;-)

I'll update you (here) after we apply the changes and test again.

Thanks for your help!
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [Error]: Java heap memory error on adding large attachment

2008-02-16 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team
[EMAIL PROTECTED] wrote:
 I'll update you (here) after we apply the changes and test again.

 Thanks for your help!

Once you get it running I think we need to hear from anybody else about 
the difference between CATALINA_OPTS and JAVA_OPTS to create a 
reasonable FAQ entry applying to Tomcat.

Greetings,

-- 
Ricardo Rodríguez
Your EPEC Network ICT Team

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [Error]: Java heap memory error on adding large attachment

2008-02-16 Thread Pavel
I just looked at catalina.bat and it looks like there is no difference in
how these used - both eventually get into java command line.
Perhaps tomcat guys wanted to keep java and catalina params logically
separated.

Pavel

On Feb 16, 2008 4:38 PM, [Ricardo Rodriguez] Your EPEC Network ICT Team 
[EMAIL PROTECTED] wrote:

 [EMAIL PROTECTED] wrote:
  I'll update you (here) after we apply the changes and test again.
 
  Thanks for your help!

 Once you get it running I think we need to hear from anybody else about
 the difference between CATALINA_OPTS and JAVA_OPTS to create a
 reasonable FAQ entry applying to Tomcat.

 Greetings,

 --
 Ricardo Rodríguez
 Your EPEC Network ICT Team

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [Error]: Java heap memory error on adding large attachment

2008-02-16 Thread Pavel
Here is my version of what happens in QA.

* What does out of memory error mean?
  - Java virtual machine (which runs tomcat which runs xwiki) has run out of
heap space and cannot allocate anything anymore.

* Is it related to MySQL packet size?
  - No

* Why this error happens?
  - Because application needs more memory than JMV is allowed to use.

* How is that related to attachments?
  - The way xwiki handles attachments is, well, not perfect.
  Somewhat related thread is
http://lists.xwiki.org/pipermail/users/2007-November/009362.html

* So what can you do?
  - a) Use -Xms and -Xmx java parameters to increase heap size.
  - b) Implement and contribute to XWiki effective attachment handling.

* What are the -Xms and -Xmx params?
  - -Xms tells java the initial heap size, -Xmx controls max size. The
latter is of special interest in this case and can be increased.

Pavel

On Feb 16, 2008 4:24 PM, [EMAIL PROTECTED] wrote:

 Ricardo Rodriguez wrote:

 [EMAIL PROTECTED] wrote:
  An MS Word document.
 
  The error also happened with a 6.5 MB zip file - so the xwiki limit
 of
  10MB may not be the issue (although documents larger than the alleged
  1MB MySQL limit have been successfully uploaded).

 Thus, the problem may arise from the amount of memory available for
 Java. What servlet container are you using? I've seen this error here
 running Tomcat. You can increase this amount by passing this parameter
 -Xmx256m -Xms256m (in this case 256Mb will be the new amount of
 available memory) at startup time.

 I'll have to check with the lab folks - I believe they started with the
 1.2M2 Windows complete build, then upgraded to 1.2RC2.

 I will let you know after I have heard from them.

 I wanted to make the changes one step at a time to isolate the root
 cause.

 So, you have to shutdown your servlet container, modify some script to
 startup.sh, catalina.sh or whatever your are using to launch Tomcat, to

 add this paramenters to CATALINA_OPTS or JAVA_OPTS. I have not a clear

 idea about what is the right variable to be modified. Any feedback will

 be really welcome.

  Here is the script I am using here to start Tomcat:

 mire:/home/webmaster/bin # cat start_tomcat6
 #!/bin/sh
 export CATALINA_HOME=/usr/share/tomcat-6.0.10
 export JAVA_HOME=/usr/share/java/jre-1.6.0_01
 export JRE_HOME=/usr/share/java/jre-1.6.0_01
 export CATALINA_OPTS=-Xmx512m -Xms512m
 export JAVA_OPTS=-Xmx512m -Xms512m
 $CATALINA_HOME/bin/startup.sh

 As per your question about the need of restarting XWiki so that the new

 configuration values become effective. Yes, this is required. xwiki.cfg

 is read at deployment time. So if you have any utility that allow you
 to
 restart just one application, you are a lucky person :-) If you have
 not
 it, just restart the servlet container.

 I expected that to be the case - and the FAQ should be updated to
 reflect that
 (I didn't consider myself as authoritative, so I didn't want to edit the
 entry).

 I would also suggest that the error code (Java ) be added to the
 text as well.

 I am sure there are people out there with a much more in depth
 knowledge
 about this issue. But this has helped me. I hope it could be useful for

 you as well.

 Perhaps, but by speaking, you're the most effective person ;-)

 I'll update you (here) after we apply the changes and test again.

 Thanks for your help!
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [Error]: Java heap memory error on adding large attachment

2008-02-16 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team
Pavel wrote:
 Here is my version of what happens in QA.

 * What does out of memory error mean?
   - Java virtual machine (which runs tomcat which runs xwiki) has run 
 out of heap space and cannot allocate anything anymore.

 * Is it related to MySQL packet size?
   - No

 * Why this error happens?
   - Because application needs more memory than JMV is allowed to use.

 * How is that related to attachments?
   - The way xwiki handles attachments is, well, not perfect.
   Somewhat related thread is 
 http://lists.xwiki.org/pipermail/users/2007-November/009362.html

 * So what can you do?
   - a) Use -Xms and -Xmx java parameters to increase heap size.
   - b) Implement and contribute to XWiki effective attachment handling.

 * What are the -Xms and -Xmx params?
   - -Xms tells java the initial heap size, -Xmx controls max size. The 
 latter is of special interest in this case and can be increased.

 Pavel

Hi Pavel,

Do you know if this heap size issue happens just working with Tomcat as 
servlet container or it is generalizable to other application servers? 
It could be advisable clarify that this FAQ applies just to XWiki 
running on a Tomcat/MySQL server.

I would add a link to heap, something as 
http://dictionary.zdnet.com/definition/heap.html. I am not a programmer, 
so I do need this kind of help to know what is happening with my 
installation :-)

As per the CATALINA_OPTS or JAVA_OPTS variables, it would be great to 
have a confirmation, but by tracking their values along catalina.sh and 
startup.sh I reach the same conclusion you presented. FAQs are wiki 
entries, so anybody can modify them! I would add some
sample lines as (this apply to Unix-based systems, could you add that 
applying to Windows ones?)...

* to be included in a script calling startup.sh: both variables will be 
passed in to the startup process.

export CATALINA_OPTS=-Xmx512m -Xms512m
export JAVA_OPTS=-Xmx512m -Xms512m

I am guessing it is of course possible to add this values within 
catanina.sh or startup.sh, but I do prefer don't touch these files if 
possible.

Cheers,

Ricardo


-- 
Ricardo Rodríguez
Your EPEC Network ICT Team

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [Error]: Java heap memory error on adding large attachment

2008-02-14 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team
[EMAIL PROTECTED] wrote:

 When attempting to upload a 10.5MB file attachment to a page in  XE 
 1.2-milestone-2.5917, user consistently get the error:


 Java Heap Space Out Of Memory Exception !


Hi,

http://www.xwiki.org/xwiki/bin/view/FAQ/Howtoincreasethemaximumattachmentsize

Just curiosity, what kind of file are you uploading? An image? Thanks.

HTH,

-- 
Ricardo Rodríguez
Your EPEC Network ICT Team

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [Error]: Java heap memory error on adding large attachment

2008-02-14 Thread Dowson_Jim
Ricardo Rodriguez wrote:

[EMAIL PROTECTED] wrote:

 When attempting to upload a 10.5MB file attachment to a page in  XE 
 1.2-milestone-2.5917, user consistently get the error:

 Java Heap Space Out Of Memory Exception !

 Hi,


http://www.xwiki.org/xwiki/bin/view/FAQ/Howtoincreasethemaximumattachmen
tsize

Thanks - I have modified the xwiki preferences (as described) - does XE
need to be restarted for it to take effect?

(I haven't changed mySQL yet) - but will do some more testing first.


Just curiosity, what kind of file are you uploading? An image? Thanks.

An MS Word document. 

The error also happened with a 6.5 MB zip file - so the xwiki limit of
10MB may not be the issue (although documents larger than the alleged
1MB MySQL limit have been successfully uploaded). 

I'm going to test again, then look at the MySQL params...

Thanks

--
Jim Dowson
CTO, Global Services, (821-76814)
Linx: (617) 598-0505

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [Error]: Java heap memory error on adding large attachment

2008-02-14 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team
[EMAIL PROTECTED] wrote:
 An MS Word document. 

 The error also happened with a 6.5 MB zip file - so the xwiki limit of
 10MB may not be the issue (although documents larger than the alleged
 1MB MySQL limit have been successfully uploaded). 

Thus, the problem may arise from the amount of memory available for 
Java. What servlet container are you using? I've seen this error here 
running Tomcat. You can increase this amount by passing this parameter 
-Xmx256m -Xms256m (in this case 256Mb will be the new amount of 
available memory) at startup time.

So, you have to shutdown your servlet container, modify some script to 
startup.sh, catalina.sh or whatever your are using to launch Tomcat, to 
add this paramenters to CATALINA_OPTS or JAVA_OPTS. I have not a clear 
idea about what is the right variable to be modified. Any feedback will 
be really welcome.

Here is the script I am using here to start Tomcat:

mire:/home/webmaster/bin # cat start_tomcat6
#!/bin/sh
export CATALINA_HOME=/usr/share/tomcat-6.0.10
export JAVA_HOME=/usr/share/java/jre-1.6.0_01
export JRE_HOME=/usr/share/java/jre-1.6.0_01
export CATALINA_OPTS=-Xmx512m -Xms512m
export JAVA_OPTS=-Xmx512m -Xms512m
$CATALINA_HOME/bin/startup.sh

As per your question about the need of restarting XWiki so that the new 
configuration values become effective. Yes, this is required. xwiki.cfg 
is read at deployment time. So if you have any utility that allow you to 
restart just one application, you are a lucky person :-) If you have not 
it, just restart the servlet container.

I am sure there are people out there with a much more in depth knowledge 
about this issue. But this has helped me. I hope it could be useful for 
you as well.

Greetings,

-- 
Ricardo Rodríguez
Your EPEC Network ICT Team

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users