Results 1 to 7 of 7

Thread: zmlmtpinject not working

  1. #1
    tron is offline Senior Member
    Join Date
    Oct 2005
    Posts
    52
    Rep Power
    9

    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

  2. #2
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    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?

  3. #3
    tron is offline Senior Member
    Join Date
    Oct 2005
    Posts
    52
    Rep Power
    9

    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?

  4. #4
    anand is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    274
    Rep Power
    9

    Default wow

    what size is the message, and what is the -Xmx option for the VM (ps -ef | grep tomcat).

  5. #5
    tron is offline Senior Member
    Join Date
    Oct 2005
    Posts
    52
    Rep Power
    9

    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).

  6. #6
    anand is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    274
    Rep Power
    9

    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?

  7. #7
    tron is offline Senior Member
    Join Date
    Oct 2005
    Posts
    52
    Rep Power
    9

    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 Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. I got Ubuntu and Zimbra working
    By pacsteel in forum Installation
    Replies: 73
    Last Post: 06-23-2008, 11:41 AM
  2. Zimbra stoped working overnight
    By vlskip in forum Installation
    Replies: 32
    Last Post: 03-07-2006, 01:52 PM
  3. zmlmtpinject sometimes hangs on errors
    By jigi in forum Administrators
    Replies: 6
    Last Post: 01-18-2006, 09:14 PM
  4. antispam not working?
    By moebis in forum Installation
    Replies: 16
    Last Post: 12-03-2005, 08:11 PM
  5. HTTPS Is Working, HTTP Not Working
    By uh-nu-bu in forum Installation
    Replies: 12
    Last Post: 11-09-2005, 06:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •