Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Zimbra 8 and java heap with few other problems

  1. #1
    kiribool is offline Member
    Join Date
    Mar 2011
    Posts
    10
    Rep Power
    4

    Default Zimbra 8 and java heap with few other problems

    Hi all,
    I use 8.0.4.GA.5737.UBUNTU12.64 UBUNTU12_64 FOSS edition on virtual machine by ESXi 5.1. 5GB RAM. 40 users.
    Imap, imaps, pop3 and pop3s are configured with proxy.
    My Java config:
    Code:
    zmlocalconfig | grep -i java
    defang_av_javascript = javascript
    javamail_imap_debug = false
    javamail_imap_enable_starttls = true
    javamail_imap_test_timeout = 20
    javamail_imap_timeout = 60
    javamail_pop3_debug = false
    javamail_pop3_enable_starttls = true
    javamail_pop3_test_timeout = 20
    javamail_pop3_timeout = 60
    javamail_smtp_debug = false
    javamail_smtp_enable_starttls = true
    javamail_smtp_timeout = 60
    javamail_zparser = true
    javamail_zsmtp = true
    mailboxd_java_heap_new_size_percent = 25
    mailboxd_java_heap_size = 1024
    mailboxd_java_options = -server -Djava.awt.headless=true -Dsun.net.inetaddr.ttl=${networkaddress_cache_ttl} -Dorg.apache.jasper.compiler.disablejsr199=true -XX:+UseConcMarkSweepGC -XX:PermSize=128m -XX:MaxPermSize=350m -XX:SoftRefLRUPolicyMSPerMB=1 -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:-OmitStackTraceInFastThrow -Djava.net.preferIPv4Stack=true
    mailboxd_truststore = /opt/zimbra/java/jre/lib/security/cacerts
    spnego_java_options = -Djava.security.krb5.conf=${mailboxd_directory}/etc/krb5.ini -Djava.security.auth.login.config=${mailboxd_directory}/etc/spnego.conf -Djavax.security.auth.useSubjectCredsOnly=false
    zimbra_java_home = /opt/zimbra/java
    zimbra_java_path = java
    zimbra_zmjava_java_ext_dirs =
    zimbra_zmjava_java_library_path =
    zimbra_zmjava_options = -Xmx1024m
    Also, I turnoff ldap internal security:
    Code:
     zmlocalconfig | grep -i zimbra_require_interprocess_security
    zimbra_require_interprocess_security = 0
    Periodically, zimbra no responding and in the /opt/zimbra/log/mailbox.log I see these messages:
    Code:
    2013-08-06 11:36:16,721 ERROR [ImapServer-3] [name=mail@example.com;mid=4;ip=1.1.1.1;oip=3.3.3.3;via=1.1.1.1(nginx/1.2.0-zimbra);ua=Zimbra/8.0.4_GA_5737;] imap - java.lang.OutOfMemoryError: Java heap space
    java.lang.OutOfMemoryError: Java heap space
    at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
            at java.nio.ByteBuffer.allocate(ByteBuffer.java:331)
            at org.apache.mina.core.buffer.SimpleBufferAllocator.allocateNioBuffer(SimpleBufferAllocator.java:44)
            at org.apache.mina.core.buffer.SimpleBufferAllocator.allocate(SimpleBufferAllocator.java:36)
            at org.apache.mina.core.buffer.IoBuffer.allocate(IoBuffer.java:227)
            at org.apache.mina.core.buffer.IoBuffer.allocate(IoBuffer.java:210)
    or
    Code:
    2013-08-06 10:35:06,966 ERROR [ImapServer-1918] [name=mail1@example.com;mid=61;ip=1.1.1.1;oip=2.2.2.2;via=1.1.1.1(nginx/1.2.0-zimbra);ua=Zimbra/8.0.4_GA_5737;] imap - java.lang.OutOfMemoryError: Java heap space
    java.lang.OutOfMemoryError: Java heap space
    After that, I restart all zimbra services. After restart, thunderbird clients can't authorize in imap server.
    At this time in the nginx.log:
    Code:
    2013/08/06 11:44:35 [info] 2958#0: *122 upstream timed out (110: Connection timed out) while connecting to upstream, client: 2.2.2.2, server: 0.0.0.0:993, login: "mail1@example.com", upstream: 1.1.1.1:7143 (2.2.2.2:39949-1.1.1.1:993) <=> (1.1.1.1:35972-1.1.1.1:7143)
    After next restart all zimbra services all work.

    What can I do for solution of these problems?
    Thank you!
    Last edited by kiribool; 08-06-2013 at 02:37 AM.

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,492
    Rep Power
    56

    Default

    Quote Originally Posted by kiribool View Post
    I use 8.0.4.GA.5737.UBUNTU12.64 UBUNTU12_64 FOSS edition on virtual machine by ESXi 5.1. 5GB RAM. 40 users.
    Have you tried increasing the RAM for this VM? How much installed RAM does this server have?What other VMs run on this hardware?

    Quote Originally Posted by kiribool View Post
    Imap, imaps, pop3 and pop3s are configured with proxy.
    Why do you have the proxy installed? It's not necessary on a single server.

    Quote Originally Posted by kiribool View Post
    Also, I turnoff ldap internal security:
    Why have you done that, what advantage do you think it gives you?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    kiribool is offline Member
    Join Date
    Mar 2011
    Posts
    10
    Rep Power
    4

    Default

    Thanks for your reply.
    Have you tried increasing the RAM for this VM? How much installed RAM does this server have?What other VMs run on this hardware?
    I increase before this post on 1Gb. Now 5Gb RAM. In this physical server running a lot of small VMs, such as windows 7, windows servers, linux.

    Why do you have the proxy installed? It's not necessary on a single server.
    I thought that the enabling proxy will reduce the load on the imap and pop3 server. Am I wrong?

    Why have you done that, what advantage do you think it gives you?
    In this article Performance Tuning Guidelines for Large Deployments - Zimbra :: Wiki I read this:
    The default configuration is zimbra_require_interprocess_security=1, which will force mailboxd to use LDAP STARTTLS for all LDAP queries. This is good for security, but will hurt performance in a large environment. STARTTLS requires more resources/processing, but more importantly - JNDI is inefficient with LDAP STARTTLS connections, because it uses individual new connections for each LDAP request rather than connections out of the LDAP connection pool. As long as your internal network is "trusted", there is generally no reason to use encrypted LDAP requests, since these requests are only on the internal protected network and not accessible to external users. Setting this to 0 is recommended if acceptable from an internal security perspective.
    Am I wrong again?

  4. #4
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,492
    Rep Power
    56

    Default

    Quote Originally Posted by kiribool View Post
    I increase before this post on 1Gb. Now 5Gb RAM. In this physical server running a lot of small VMs, such as windows 7, windows servers, linux.
    You didn't tell me how much RAM is on your ESXi server nor exactly how many VMs you have.

    Quote Originally Posted by kiribool View Post
    I thought that the enabling proxy will reduce the load on the imap and pop3 server. Am I wrong?
    On a single server it will give you no benefit.

    Quote Originally Posted by kiribool View Post
    In this article Performance Tuning Guidelines for Large Deployments - Zimbra :: Wiki I read this:

    Am I wrong again?
    Indeed it does but you don't have a 'large deployment', yours is a relatively small server but having it disabled will do no harm.

    How often is this problem happening? Has it just started or has it been happening for a while? What's the load on your server just before the problem happens i.e. how many users are online to Zimbra; are they all IMAP users or using the ZCS Web UI?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    kiribool is offline Member
    Join Date
    Mar 2011
    Posts
    10
    Rep Power
    4

    Default

    You didn't tell me how much RAM is on your ESXi server nor exactly how many VMs you have.
    Total RAM on physical server is 32Gb
    Total VMs is 12
    How often is this problem happening? Has it just started or has it been happening for a while? What's the load on your server just before the problem happens i.e. how many users are online to Zimbra; are they all IMAP users or using the ZCS Web UI?
    The problem happens about twice a week (every week). Later I use zimbra 7 on ubuntu 10.04 on same VM. These symptoms were absent. After upgrade zimbra and OS the problem happens. For example, now server is work fine and load:
    CPU: from 0% to 50%
    RAM: 2Gb
    30 users IMAP & Web UI, 5 only WEB UI, 5 only pop3.
    Thank you.

  6. #6
    kiribool is offline Member
    Join Date
    Mar 2011
    Posts
    10
    Rep Power
    4

    Default

    I noticed that yesterday and today, an error occurred on the same user. User have IMAP connection Outlook 2013.
    /opt/zimbra/log/mailbox.log:
    Code:
    2013-08-07 13:03:15,381 ERROR [ImapServer-342] [name=mail1@example.com;mid=61;ip=1.1.1.1;oip=2.2.2.2;via=1.1.1.1(nginx/1.2.0-zimbra);ua=Zimbra/8.0.4_GA_5737;] imap - java.lang.OutOfMemoryError: Java heap space
    java.lang.OutOfMemoryError: Java heap space
            at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
            at java.nio.ByteBuffer.allocate(ByteBuffer.java:331)
            at org.apache.mina.core.buffer.SimpleBufferAllocator.allocateNioBuffer(SimpleBufferAllocator.java:44)
            at org.apache.mina.core.buffer.SimpleBufferAllocator.allocate(SimpleBufferAllocator.java:36)
            at org.apache.mina.core.buffer.IoBuffer.allocate(IoBuffer.java:227)
            at org.apache.mina.core.buffer.IoBuffer.allocate(IoBuffer.java:210)
            at com.zimbra.cs.server.NioOutputStream.flush(NioOutputStream.java:79)
            at com.zimbra.cs.server.NioOutputStream.write(NioOutputStream.java:46)
            at com.zimbra.common.util.ByteUtil.copy(ByteUtil.java:724)
            at com.zimbra.common.util.ByteUtil.copy(ByteUtil.java:696)
            at com.zimbra.cs.imap.ImapPartSpecifier.write(ImapPartSpecifier.java:170)
            at com.zimbra.cs.imap.ImapHandler.fetch(ImapHandler.java:3737)
            at com.zimbra.cs.imap.ImapHandler.doFETCH(ImapHandler.java:3558)
            at com.zimbra.cs.imap.ImapHandler.executeRequest(ImapHandler.java:506)
            at com.zimbra.cs.imap.NioImapHandler.processRequest(NioImapHandler.java:124)
            at com.zimbra.cs.imap.NioImapHandler.messageReceived(NioImapHandler.java:61)
            at com.zimbra.cs.server.NioHandlerDispatcher.messageReceived(NioHandlerDispatcher.java:88)
            at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716)
            at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
            at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
            at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
            at com.zimbra.cs.server.NioLoggingFilter.messageReceived(NioLoggingFilter.java:60)
            at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
            at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
            at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
            at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:75)
            at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
            at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:780)
            at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:772)
            at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:714)
            at java.lang.Thread.run(Thread.java:722)

  7. #7
    kiribool is offline Member
    Join Date
    Mar 2011
    Posts
    10
    Rep Power
    4

    Default

    I was wrong that problem happens twice a week, it happens every day. What can you advice me about Java heap?
    Thanks a lot.

  8. #8
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,492
    Rep Power
    56

    Default

    Quote Originally Posted by kiribool View Post
    The problem happens about twice a week (every week). Later I use zimbra 7 on ubuntu 10.04 on same VM.
    Did you upgrade Ubuntu from 10.04 to 12.04 on the Zimbra server? If that's the case, this 'upgrade problem' seems to be a recurring theme (search the forums for further details) with Ubuntu running Zimbra. The only two things I can suggest are to file a bug report with exact details of the problem including the fact you upgraded Ubuntu or do a clean install of Ubuntu 12.04 and move your ZCS install to that new VM.

    Quote Originally Posted by kiribool View Post
    These symptoms were absent. After upgrade zimbra and OS the problem happens. For example, now server is work fine and load:
    CPU: from 0% to 50%
    RAM: 2Gb
    30 users IMAP & Web UI, 5 only WEB UI, 5 only pop3.
    Those figures are what I'd expect, however, 2GB is below the recommended minimum for a production server and certainly less than ZCS 8 would need.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  9. #9
    kiribool is offline Member
    Join Date
    Mar 2011
    Posts
    10
    Rep Power
    4

    Default

    Did you upgrade Ubuntu from 10.04 to 12.04 on the Zimbra server?
    Yes I did.
    You want to say that I move zimbra to fresh install Ubuntu 12.04 problem is solved? Or just for test?

  10. #10
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,492
    Rep Power
    56

    Default

    Quote Originally Posted by kiribool View Post
    You want to say that I move zimbra to fresh install Ubuntu 12.04 problem is solved? Or just for test?
    Yes, I believe the problem will go away if you move to a clean install. I would always recommend a clean install for ZCS and just because you can upgrade the OS doesn't mean you should, many distributions recommend you never do that type of upgrade for important servers. As I mentioned above, take a look at some of the other threads on this topic, it seems to be problematic with upgrades of Ubuntu and in these circumstances (particularly, running in a VM) some users get this problem. My advice is just that, you're free to ignore it and it comes with no guarantee and you you're free to file a bug report and follow through with your current installation.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. java.lang.OutOfMemoryError: Java heap space
    By bofh in forum Administrators
    Replies: 13
    Last Post: 03-02-2012, 08:01 AM
  2. java.lang.OutOfMemoryError: Java heap space
    By iskondi in forum Error Reports
    Replies: 10
    Last Post: 12-29-2010, 01:34 PM
  3. [SOLVED] java.lang.OutOfMemoryError: Java heap space
    By frickson in forum Error Reports
    Replies: 3
    Last Post: 05-27-2009, 09:07 PM
  4. java.lang.OutOfMemoryError: Java heap space
    By mayk.backus in forum Error Reports
    Replies: 1
    Last Post: 08-12-2008, 09:07 AM
  5. Replies: 1
    Last Post: 06-06-2007, 07:21 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
  •