最近ActiveMQ 5.15.3 会报 OutofMemory的错误

在 wrapper.conf中

  1. #wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=true
  2. wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=false
  3. #加入新的一句
  4. wrapper.java.additional.13=-Xms2G -Xmx2G -Xss512K

  activemq.xml里修改

  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8.  
  9. http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11. Unless required by applicable law or agreed to in writing, software
  12. distributed under the License is distributed on an "AS IS" BASIS,
  13. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. See the License for the specific language governing permissions and
  15. limitations under the License.
  16. -->
  17. <!-- START SNIPPET: example -->
  18. <beans
  19. xmlns="http://www.springframework.org/schema/beans"
  20. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  21. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  22. http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
  23.  
  24. <!-- Allows us to use system properties as variables in this configuration file -->
  25. <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  26. <property name="locations">
  27. <value>file:${activemq.conf}/credentials.properties</value>
  28. </property>
  29. </bean>
  30.  
  31. <!-- Allows accessing the server log -->
  32. <bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"
  33. lazy-init="false" scope="singleton"
  34. init-method="start" destroy-method="stop">
  35. </bean>
  36.  
  37. <!--
  38. The <broker> element is used to configure the ActiveMQ broker.
  39. -->
  40. <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}">
  41.  
  42. <destinationPolicy>
  43. <policyMap>
  44. <policyEntries>
  45. <policyEntry topic=">" producerFlowControl="true">
  46. <!-- The constantPendingMessageLimitStrategy is used to prevent
  47. slow topic consumers to block producers and affect other consumers
  48. by limiting the number of messages that are retained
  49. For more information, see:
  50.  
  51. http://activemq.apache.org/slow-consumer-handling.html
  52.  
  53. -->
  54. <pendingMessageLimitStrategy>
  55. <constantPendingMessageLimitStrategy limit="1000"/>
  56. </pendingMessageLimitStrategy>
  57. </policyEntry>
  58. <policyEntry queue=">" producerFlowControl="false" memoryLimit="20mb" >
  59. <!-- Use VM cursor for better latency
  60. For more information, see:
  61.  
  62. http://activemq.apache.org/message-cursors.html
  63.  
  64. <pendingQueuePolicy>
  65. <vmQueueCursor/>
  66. </pendingQueuePolicy>
  67. -->
  68. </policyEntry>
  69. </policyEntries>
  70. </policyMap>
  71. </destinationPolicy>
  72.  
  73. <!--
  74. The managementContext is used to configure how ActiveMQ is exposed in
  75. JMX. By default, ActiveMQ uses the MBean server that is started by
  76. the JVM. For more information, see:
  77.  
  78. http://activemq.apache.org/jmx.html
  79. -->
  80. <managementContext>
  81. <managementContext createConnector="false"/>
  82. </managementContext>
  83.  
  84. <!--
  85. Configure message persistence for the broker. The default persistence
  86. mechanism is the KahaDB store (identified by the kahaDB tag).
  87. For more information, see:
  88.  
  89. http://activemq.apache.org/persistence.html
  90. -->
  91. <persistenceAdapter>
  92. <!--<kahaDB directory="${activemq.data}/kahadb"/>-->
  93.  
  94. <kahaDB directory="${activemq.data}/kahadb"
  95. enableIndexWriteAsync="true"
  96. enableJournalDiskSyncs="false"/>
  97. </persistenceAdapter>
  98.  
  99. <!--
  100. The systemUsage controls the maximum amount of space the broker will
  101. use before disabling caching and/or slowing down producers. For more information, see:
  102. http://activemq.apache.org/producer-flow-control.html
  103.  
  104. <systemUsage>
  105. <systemUsage>
  106. <memoryUsage>
  107. <memoryUsage percentOfJvmHeap="70" />
  108. </memoryUsage>
  109. <storeUsage>
  110. <storeUsage limit="100 gb"/>
  111. </storeUsage>
  112. <tempUsage>
  113. <tempUsage limit="50 gb"/>
  114. </tempUsage>
  115. </systemUsage>
  116. </systemUsage>
  117. -->
  118.  
  119. <systemUsage>
  120. <systemUsage>
  121. <memoryUsage>
  122. <memoryUsage limit="1400 mb"/>
  123. </memoryUsage>
  124. <storeUsage>
  125. <storeUsage limit="100 gb"/>
  126. </storeUsage>
  127. <tempUsage>
  128. <tempUsage limit="50 gb"/>
  129. </tempUsage>
  130. </systemUsage>
  131. </systemUsage>
  132. <!--
  133. The transport connectors expose ActiveMQ over a given protocol to
  134. clients and other brokers. For more information, see:
  135.  
  136. http://activemq.apache.org/configuring-transports.html
  137. -->
  138. <transportConnectors>
  139. <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
  140. <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
  141. <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
  142. <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
  143. <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
  144. <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
  145. </transportConnectors>
  146.  
  147. <!-- destroy the spring context on shutdown to stop jetty -->
  148. <shutdownHooks>
  149. <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
  150. </shutdownHooks>
  151.  
  152. </broker>
  153.  
  154. <!--
  155. Enable web consoles, REST and Ajax APIs and demos
  156. The web consoles requires by default login, you can disable this in the jetty.xml file
  157.  
  158. Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
  159. -->
  160. <import resource="jetty.xml"/>
  161.  
  162. </beans>
  163. <!-- END SNIPPET: example -->

ActiveMq Windows 配置优化的更多相关文章

  1. TOMCAT 8.5 配置优化以及JVM配置(windows server)

    下载官方的tomcat,我这里用的是TOMCAT 8.5.46,然后解压出来,解压后的目录如下图 一.server.xml配置优化 进入conf目录,打开server.xml 文件 1. 找到 < ...

  2. PHPSTORM/IntelliJ IDEA 常用 设置配置优化

    PHPSTORM/IntelliJ IDEA 常用 设置配置优化 - meetrice 时间 2014-09-06 10:17:00  博客园-所有随笔区 原文  http://www.cnblogs ...

  3. windows tomcat 优化

    windows tomcat 优化 1.  tomcat conf server.xml 在server.xml中修改以一部分,增加节点数目,可以很好的提高性能: <Connector port ...

  4. nginx配置优化 第二章

    一:常用功能优化: 1:网络连接的优化: 只能在events模块设置,用于防止在同一一个时刻只有一个请求的情况下,出现多个睡眠进程会被唤醒但只能有一个进程可获得请求的尴尬,如果不优化,在多进程的ngi ...

  5. 如何优化tomcat配置优化

    tomcat默认参数是为开发环境制定,而非适合生产环境,尤其是内存和线程的配置,默认都很低,容易成为性能瓶颈. tomcat内存优化 linux修改TOMCAT_HOME/bin/catalina.s ...

  6. IIS服务器与web.config配置优化指南

    摘自: http://www.3lian.com/edu/2012/11-13/43890.html .修改IIS最大工作进程数 a. 请考虑以下几点: .每一个工作进程都会消耗系统资源和CPU占用率 ...

  7. Android零基础入门第13节:Android Studio配置优化,打造开发利器

    原文:Android零基础入门第13节:Android Studio配置优化,打造开发利器 是不是很多同学已经有烦恼出现了?电脑配置已经很高了,但是每次运行Android程序的时候就很卡,而且每次安装 ...

  8. OOM和JVM配置优化

    OOM这个缩写就是Java程序开发过程中让人最头痛的问题:Out of Memory.在很多开发人员的开发过程中,或多或少的都会遇到这类问题,这类问题定位比较困难,往往需要根据经验来判断可能出现问题的 ...

  9. 站点部署,IIS配置优化指南[转]

    站点部署,IIS配置优化指南 目录 一.       设置应用程序池默认设置 二.       常规设置 三.       优化回收策略 四.       性能 五.       IIS初始化(预加载 ...

随机推荐

  1. js/php判断移动端还是PC端

    if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobi ...

  2. Java高级特性 第14节 解析XML文档(2) - SAX 技术

    一.SAX解析XML文档 SAX的全称是Simple APIs for XML,也即XML简单应用程序接口.与DOM不同,SAX提供的访问模式是一种顺序模式,这是一种快速读写XML数据的方式.当使用S ...

  3. 1.1.27 word表格里的文字不显示

    1.问题: 下载其他人做的表格后,在表格内打字,字不显示. 2.解决方案: 产生这种问题的原因是,该表格设置的字体,你的电脑未安装. a.将隐藏文字选中,设为[宋体]或其他已经安装字体. b.下载[方 ...

  4. tcpdump+wireshark抓包分析

    上一篇文章中,我们介绍了tcpdump如何抓包. tcpdump是命令行下便捷的抓包和分析工具,但使用方式不够友好, wireshark是带图形化界面的抓包和分析工具,操作简便,但需要主机有显示器. ...

  5. HanLP中文分词Lucene插件

    基于HanLP,支持包括Solr(7.x)在内的任何基于Lucene(7.x)的系统. Maven <dependency> <groupId>com.hankcs.nlp&l ...

  6. windows 时间服务器配置详解

    最近发现公司的服务器时间一直不准确,也无法和外部时间源进行同步.公司是域环境,按理说客户端PC应该自动和域控AD进行时间同步,但是PC机时间老是不能同步,不是慢了就是快了,就是和域控时间不一致.其它服 ...

  7. jquery 一键复制文本到剪切板

    <a id="copy" data-clipboard-text="123456">复制文本</a> $(function(){ var ...

  8. 常用git的命令

    常用git的命令 详解git fetch与git pull的区别 Git放弃本地所有修改,强制更新: git fetch --all git reset --hard origin/master 说明 ...

  9. <ROS> message_filters 对齐多种传感器数据的时间戳

    联合标定三维雷达和IMU,第一步要先对齐两种传感信息的时间戳. ros官网提供了message_filters用于对齐多种传感信息的时间戳. http://wiki.ros.org/message_f ...

  10. Java8-Optional与null

    对null进行处理 程序中经常需要对null情况进行处理,比如Course类中有一个List stuList属性,Student有一个name属性. 现在想要查看某个student的name属性的长度 ...