Results 1 to 2 of 2

Thread: 8000+ domains

  1. #1
    Join Date
    Jan 2008
    Rep Power

    Default 8000+ domains

    Hi, I had a script to add the 8000+ domains that my existing mail server manages. When I log into the admin interface, I see 0 domains and if I use zmprov I get:

    $ bin/zmprov gad
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at com.zimbra.common.soap.Element$XMLElement.addAttri bute(
    at com.zimbra.common.soap.Element.addAttribute(Elemen
    at com.zimbra.common.soap.Element.convertDOM(Element. java:404)
    at com.zimbra.common.soap.Element.convertDOM(Element. java:412)
    at com.zimbra.common.soap.Element.convertDOM(Element. java:412)
    at com.zimbra.common.soap.Element.convertDOM(Element. java:412)
    at com.zimbra.common.soap.Element.convertDOM(Element. java:412)
    at com.zimbra.common.soap.Element.parseXML(Element.ja va:396)
    at com.zimbra.common.soap.Element.parseXML(Element.ja va:394)
    at com.zimbra.common.soap.SoapTransport.parseSoapResp onse(
    at com.zimbra.common.soap.SoapHttpTransport.invoke(So
    at com.zimbra.common.soap.SoapTransport.invoke(SoapTr
    at com.zimbra.common.soap.SoapTransport.invoke(SoapTr
    at com.zimbra.cs.account.soap.SoapProvisioning.invoke (
    at com.zimbra.cs.account.soap.SoapProvisioning.getAll Domains(
    at com.zimbra.cs.account.ProvUtil.doGetAllDomains(Pro
    at com.zimbra.cs.account.ProvUtil.execute(ProvUtil.ja va:446)
    at com.zimbra.cs.account.ProvUtil.main( 1724)

    I know that a large number of the domains are there, but how the hell I am I supposed to check?

  2. #2
    Join Date
    Oct 2007
    New York City - Hell's Kitchen
    Rep Power

    Default 8K is a lot.


    Help, I'm getting an OutOfMemoryError but I've tuned as much as I can.

    There are three possible causes for an OutOfMemoryError. The first is that the JVM has a real memory leak, caused by a bug in the internal implementation of the JVM heap management. This is extremely unlikely. All JVMs are tested very strenuously for this, and it would be the absolute top priority bug if anyone found such a bug. So you can pretty much eliminate this possibility.

    The second possible cause of an OutOfMemoryError is that you simply haven't got enough memory available for the workings of your application. There are two possible solutions to this situation, either increase the available JVM heap size, or decrease the amount of memory your application needs. Increasing the available JVM heap size is simply done with the -Xmx parameter to the JVM. If you still have the memory problem because you have already increased this parameter as much as possible (up to available RAM, don't exceed real system memory or your application will page and crawl to a halt), then you need to reduce the amount of memory being used by your application. Reducing application memory may be simple, you may just be allowing some collections to be too big, for example using many large buffers. Or it can be complex, requiring you to reimplement some classes, or even redesign the application.

    Reader James Stauffer has pointed out that with some JVMs (e.g. the Sun JVMs), there is also a "Perm" space which holds JVM structures and class objects. If you are using a very large number of classes, it is possible to run out of space in "Perm" space, and you may need to increase the size of that space, e.g. with the Sun JVM using the -XX:PermSize and -XX:MaxPermSize options.

    The third possible cause of an OutOfMemoryError is the most common, unintentional object retention. You are hanging on to objects without realizing it and this is causing your heap to grow and grow until you have nothing spare.

    Dealing with an OutOfMemoryError:

    * Is it an internal JVM bug? Extremely unlikely. Highest priority JVM bug if true (so how come no one else has found it yet?)
    * Not enough memory for actual application needs? Two options:
    o Increase the maximum heap size with -Xmx parameter (or Perm space size with -XX:MaxPermSize); or
    o Decrease the amount of memory needed by using smaller collections/caches/tables/objects/..., i.e. by tuning object sizes, by redesign, and by reimplementation
    * Unintentional object retention? Find the root object holding on to the unintentionally retained objects, and change it to release those objects. A generic procedure for doing this is outlined in this IBM developerworks article. A summary of the procedure is
    o Wait until the application has reached the steady state, where you would expect most new objects are temporary objects that can be garbage collected; typically this is after all the application initializations have finished.
    o Force a garbage collection, and take an object snapshot of the heap.
    o Do whatever work it is that is causing unintentionally retained objects.
    o Force another garbage collection and then take a second object snapshot of the heap.
    o Compare the two snapshots to see which objects have increased in number from the first snapshot to the next. Because you forced garbage collections before the snapshots, the objects left should all be objects referenced by the application, and comparing the two snapshots should identify exactly those newly created objects that are being retained by the application.
    o Using your knowledge of the application, determine from the snapshot comparison which of the objects are being unintentionally retained.
    o Track back-references to find which objects are referencing the unintentionally retained objects, until you reach the root object that is causing the problem.

    The team

Similar Threads

  1. Advanced MTA Configuration - multiple domains
    By keyhman in forum Installation
    Replies: 6
    Last Post: 04-20-2012, 02:23 AM
  2. Sending mails to domains without use of DNS server
    By generic31 in forum Administrators
    Replies: 5
    Last Post: 08-08-2011, 03:17 AM
  3. Replies: 1
    Last Post: 10-26-2007, 08:21 AM
  4. Replies: 3
    Last Post: 06-07-2007, 07:19 AM
  5. Virtual Domains Breaking Themes
    By jhoelz in forum Administrators
    Replies: 0
    Last Post: 03-14-2007, 05: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