<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Sealyu

    --- 博客已遷移至: http://www.sealyu.com/blog

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      618 隨筆 :: 87 文章 :: 225 評論 :: 0 Trackbacks
    JDK 1.4 does not provide information why the OutOfMemory error occurred. Since Confluence version 2.8, this JDK is not supported any longer.
    JDK 1.5 or 1.6 are the recommended JDK to be used and they do provide a description of the OOM error. JDK 1.6 also has around a 20% performance improvement over 1.5

    Since the default memory setting usually is around 64 or 128MB (256MB in Confluence 2.2 and later), you might have to adjust the settings to run a bigger Confluence instance with sufficient memory.

    On this page:

    Diagnosis and Common Causes

    There are several reasons that out of memory exceptions can be thrown. Either the virtual machine Confluence is using has hit its allocated memory limit, the system on which Confluence is running has run out of physical and virtual memory, or Confluence is consuming too much memory. In the first case, you should modify the maximum heap size of the virtual machine, per the instructions in this document; in the second or third cases, the solution is to identify the culprit of the memory leak.

    For help determining which memory settings to choose, consult Managing Application Server Memory Settings.

    If you have not yet set your memory settings and your usage has increased, it's likely that you must set your memory, described below. If your usage patterns have not changed but you've added a plugin or done an upgrade, it's likely that there is a memory leak in a plugin.

    1. If you're using the in-memory database (HSQLDB), migrate to an external database. The in-memory database can use a lot of memory.
    2. If you are using XML backups, disable them and move to the Alternative Backup Strategy. The XML backup process can be a memory hog.

    To troubleshoot potential memory leaks, enter Plugin Support Mode. Take thread dumps during normal operations and during an outage, and submit this information in a support ticket.

    Determining the various causes of memory errors

    There are different kinds of memory limits inside the Java Virtual Machine. Each limit can be configured independently. But you must first find out which limit you have reached.

    java.lang.OutOfMemoryError: PermGen space

    If you get the error message: java.lang.OutOfMemoryError: PermGen space this means that you have exceeded Java's default 64Mb block for loading class files. This can happen if many plugins are installed. You may want to increase the PermGen memory size to suit your needs.

    In the following sample, the blue parameter shows how the PermGen Memory has been set to 192 megabytes. This value should be set depending on your memory requirements. 192m should be sufficient for Confluence even when many plugins are installed.

    JAVA_OPTS="-Xms128m -Xmx1024m -XX:MaxPermSize=192m $JAVA_OPTS -Djava.awt.headless=true "

    Note: The other parameters in this sample are just shown to give you some context, and are not part of this example.

    java.lang.OutOfMemoryError

    Heap space memory errors occur when the application has to deal with large amounts of data or users. These errors will contain only a java.lang.OutOfMemoryError, e.g. without the reference to PermGen space as above. You should try to increase the heap size to solve this problem. This requires configuring the Xmx and Xms parameters. In the following example, the maximum heap size is set to 1024 megabytes. This should be enough for small to medium deployments.

    JAVA_OPTS="-Xms128m -Xmx1024m -XX:MaxPermSize=256m $JAVA_OPTS -Djava.awt.headless=true "

    Note: The other parameters are only shown to give you context and are not part of this example.

    Deployments with high usage patterns may require additional memory. For high-usage deployments, it is recommended to set both Xms and Xmx as the same value (eg. -Xms1024m -Xmx1024m), _provided the memory is available_. On the other hand, adding too much memory can also cause problems (see below), so you should increment memory carefully, for example in increments of 128 megabytes.

    OutOfMemoryError: unable to create new native thread

    This error occurs when the operating system is unable to create new threads. This is due to the JVM Heap taking up the available RAM.

    Big heaps take away from the space that can be allocated for the stack of a new thread

    For 32bit Linux generally the maximum heap size of the JVM cannot be greater than 2GB. Windows systems will typically split the available physical memory 50:50 as Application and Kernel/System space, so please do not allocate an amount exceeding or approaching that split.
    The size of the stack per thread can also contribute to this problem. The stack size can reduce the number of threads that can be created.

    To fix this problem, you should reduce the size of your JVM Heap and also the size of the stack per thread.
    The stack size can be changed with the following (example) parameter:

    "-Xss512k"

    Please refer to this guide as a reference for JVM tuning.

    OutOfMemoryError: GC overhead limit exceeded

    This error indicates that the JVM took too long to free up memory during its GC process. This error can be thrown from the Serial, Parallel or Concurrent collectors. It often means that the Xmx value is too high - you might consider lowering it. See Garbage Collector Performance Issues for more details. For more severe and persistent performance issues relating to GC, it is recommended to change to a parallel collector, and to ensure that Confluence has access to the memory demanded by its users.

    The parallel collector will throw an OutOfMemoryError if too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an OutOfMemoryError will be thrown. This feature is designed to prevent applications from running for an extended period of time while making little or no progress because the heap is too small. If necessary, this feature can be disabled by adding the option -XX:-UseGCOverheadLimit to the command line.

    This kind of OutOfMemoryError can be caused if user requests drown the available resources in the JVM. When this occurs, performance will degrade aggressively. This will eventually require a restart or the application may recover.

    OutOfMemoryError: Requested array size exceeds VM limit

    This is a rare error and indicates that Confluence attempted to allocate an array that is larger than the Java heap size. More details regarding this error can be found here.
    This is due to a known limitation of the JVM as documented here. We have a bug lodged against this, to better handle this exception in Confluence.

    Setting the Memory Settings

    How to set the heap or permanent generation memory depends on your distribution, platform, and how you start Confluence. Refer to Configuring System Properties.

    If you're starting Confluence from a Windows Service, make sure you add the properties through the registry settings.

    To verify if your settings have been picked up, check Displaying System Properties.

    Other factors such as system load and allocating too much memory to your JVM Heap can also cause OutOfMemory Errors. For more information, you can refer to the JIRA documentation on Causes of OutOfMemoryErrors.
    RELATED TOPICS

    Managing Application Server Memory Settings
    Installing the Confluence EAR-WAR Edition
    FAQ Home
    Tomcat JVM options and Modify the Default JVM Settings
    Websphere Tuning JVM
    Logging A Thread Dump

    posted on 2009-10-30 14:40 seal 閱讀(724) 評論(0)  編輯  收藏 所屬分類: Java基礎
    主站蜘蛛池模板: 久久精品国产精品亚洲下载| 91精品视频免费| 亚洲高清无码在线观看| 午夜亚洲WWW湿好爽| 在线A级毛片无码免费真人| 中文字幕乱码亚洲无线三区| 无码日韩精品一区二区免费| 99热亚洲色精品国产88| 日韩免费无砖专区2020狼| 国产成人人综合亚洲欧美丁香花| 国内精品免费视频自在线| 亚洲av无码成人精品国产| 国产成人高清精品免费鸭子| 国产亚洲精品美女久久久久 | 最近高清中文字幕无吗免费看| 亚洲一区二区三区高清| 18女人水真多免费高清毛片| 亚洲国产熟亚洲女视频| 日韩a级毛片免费视频| 国产成人无码精品久久久久免费| 在线观看午夜亚洲一区| 国内少妇偷人精品视频免费| 亚洲精品中文字幕无码AV| 四虎影院免费视频| 极品美女一级毛片免费| 亚洲精品白浆高清久久久久久| 99视频在线精品免费| 亚洲中文字幕一二三四区| 亚洲成A人片在线观看中文| 免费毛片a线观看| 亚洲中文字幕AV在天堂| 亚洲人成色77777在线观看大| 国产精品白浆在线观看免费| 国内精品久久久久影院亚洲 | 久久亚洲AV无码精品色午夜| 啦啦啦中文在线观看电视剧免费版| 午夜亚洲乱码伦小说区69堂| 亚洲爱情岛论坛永久| 日韩免费视频一区| 九九美女网站免费| 亚洲精品动漫免费二区|