Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-15-2005, 10:43 AM
Senior Member
 
Posts: 52
Default zmlmtpinject not working

Whenever I tried to use zmlmtpinject to import some message into a mailbox, I get a failed message. Then zmcontrol status shows that mailbox service has been stopped.

Checking the zimbra.log file I see the following

tail -f zimbra.log
2005-10-15 06:06:48,529 FATAL [LmtpServer-1] [] system - Fatal error occurred while handling connection
java.lang.OutOfMemoryError: Java heap space

Right now the test machine I have zimbra installed on has 512 MB of RAM. I thought this meets the minimum requirement for zimbra. Please help.

tron
Reply With Quote
  #2 (permalink)  
Old 10-15-2005, 11:04 AM
Zimbra Employee
 
Posts: 4,792
Default

It just meets the minimum. So you can expect trouble on some operations. How big is the message your trying to inject? Do you have anything other than Zimbra running on the machine? Is the OS install a *minimal* install or are you running X and GUI apps locally?
Reply With Quote
  #3 (permalink)  
Old 10-15-2005, 11:21 AM
Senior Member
 
Posts: 52
Default

Thanks for the response.
There is nothing else running other than Zimbra. Also, there is no X and GUI apps locally. It is a headless server set up just to test Zimbra.


Quote:
Originally Posted by KevinH
It just meets the minimum. So you can expect trouble on some operations. How big is the message your trying to inject? Do you have anything other than Zimbra running on the machine? Is the OS install a *minimal* install or are you running X and GUI apps locally?
Reply With Quote
  #4 (permalink)  
Old 10-15-2005, 04:36 PM
Zimbra Employee
 
Posts: 274
Default wow

what size is the message, and what is the -Xmx option for the VM (ps -ef | grep tomcat).
Reply With Quote
  #5 (permalink)  
Old 10-15-2005, 04:47 PM
Senior Member
 
Posts: 52
Default

ps -ef | grep tomcat
zimbra 3879 1 0 14:40 ? 00:00:05 /opt/zimbra/java/bin/java -client -XX:NewRatio=2 -Xms148m -Xmx148m -Djava.library.path=/opt/zimbra/lib -Djava.endorsed.dirs=/opt/zimbra/tomcat/common/endorsed -classpath :/opt/zimbra/tomcat/bin/bootstrap.jar:/opt/zimbra/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/opt/zimbra/tomcat -Dcatalina.home=/opt/zimbra/tomcat -Djava.io.tmpdir=/opt/zimbra/tomcat/temp org.apache.catalina.startup.Bootstrap start

The file contains 1500 messges. The total size of the file is 11 MB.


Quote:
Originally Posted by anand
what size is the message, and what is the -Xmx option for the VM (ps -ef | grep tomcat).
Reply With Quote
  #6 (permalink)  
Old 10-15-2005, 05:17 PM
Zimbra Employee
 
Posts: 274
Default 148M is plenty

148M max heap size should be more than enough for small systems.

Note that zmlmtpinject will inject the whole file as one message. It does not understand mbox format - you will have to split into individual messages.

The default message size limit is also 10M, so even if it is treated as one big message, the message should be rejected by the LMTP code. I do not understand why an OOM manifested itself. Maybe message parsing code is going bananas?

Can you do this as the zimbra user:

Code:
$ tomcat stop
$ zmlocalconfig -e tomcat_java_options="-client -XX:NewRatio=2 -Xrunhprof:file=/tmp/hprof.txt"
$ tomcat start
$ zmlmtpinject ...
This will cause the JVM to run dog slow, but at the end of the run, the JVM should dump some heap info and we can see why the OOM was triggered.

Remeber to remove the -Xrunhprof:... option when you are done!

What else do the log files say? catalina.out, zimbra.log, etc? Anything interesting there?
Reply With Quote
  #7 (permalink)  
Old 10-15-2005, 05:48 PM
Senior Member
 
Posts: 52
Default

I am attaching the three logs here for your viewing pleasure. Let me know if you need me to run any other tests. I tried just one message per file and it worked. Thank you.

Quote:
Originally Posted by anand
148M max heap size should be more than enough for small systems.

Note that zmlmtpinject will inject the whole file as one message. It does not understand mbox format - you will have to split into individual messages.

The default message size limit is also 10M, so even if it is treated as one big message, the message should be rejected by the LMTP code. I do not understand why an OOM manifested itself. Maybe message parsing code is going bananas?

Can you do this as the zimbra user:

Code:
$ tomcat stop
$ zmlocalconfig -e tomcat_java_options="-client -XX:NewRatio=2 -Xrunhprof:file=/tmp/hprof.txt"
$ tomcat start
$ zmlmtpinject ...
This will cause the JVM to run dog slow, but at the end of the run, the JVM should dump some heap info and we can see why the OOM was triggered.

Remeber to remove the -Xrunhprof:... option when you are done!

What else do the log files say? catalina.out, zimbra.log, etc? Anything interesting there?
Attached Files
File Type: txt hprof.txt (2.8 KB, 351 views)
File Type: txt catalina.out.txt (21.1 KB, 328 views)
File Type: txt zimbra.log.txt (444 Bytes, 329 views)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.