最近ActiveMQ 5.15.3 会报 OutofMemory的错误

在 wrapper.conf中

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

  activemq.xml里修改

<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- START SNIPPET: example -->
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> <!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.conf}/credentials.properties</value>
</property>
</bean> <!-- Allows accessing the server log -->
<bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"
lazy-init="false" scope="singleton"
init-method="start" destroy-method="stop">
</bean> <!--
The <broker> element is used to configure the ActiveMQ broker.
-->
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}"> <destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" producerFlowControl="true">
<!-- The constantPendingMessageLimitStrategy is used to prevent
slow topic consumers to block producers and affect other consumers
by limiting the number of messages that are retained
For more information, see: http://activemq.apache.org/slow-consumer-handling.html -->
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy limit="1000"/>
</pendingMessageLimitStrategy>
</policyEntry>
<policyEntry queue=">" producerFlowControl="false" memoryLimit="20mb" >
<!-- Use VM cursor for better latency
For more information, see: http://activemq.apache.org/message-cursors.html <pendingQueuePolicy>
<vmQueueCursor/>
</pendingQueuePolicy>
-->
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy> <!--
The managementContext is used to configure how ActiveMQ is exposed in
JMX. By default, ActiveMQ uses the MBean server that is started by
the JVM. For more information, see: http://activemq.apache.org/jmx.html
-->
<managementContext>
<managementContext createConnector="false"/>
</managementContext> <!--
Configure message persistence for the broker. The default persistence
mechanism is the KahaDB store (identified by the kahaDB tag).
For more information, see: http://activemq.apache.org/persistence.html
-->
<persistenceAdapter>
<!--<kahaDB directory="${activemq.data}/kahadb"/>--> <kahaDB directory="${activemq.data}/kahadb"
enableIndexWriteAsync="true"
enableJournalDiskSyncs="false"/>
</persistenceAdapter> <!--
The systemUsage controls the maximum amount of space the broker will
use before disabling caching and/or slowing down producers. For more information, see:
http://activemq.apache.org/producer-flow-control.html <systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage percentOfJvmHeap="70" />
</memoryUsage>
<storeUsage>
<storeUsage limit="100 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="50 gb"/>
</tempUsage>
</systemUsage>
</systemUsage>
--> <systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage limit="1400 mb"/>
</memoryUsage>
<storeUsage>
<storeUsage limit="100 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="50 gb"/>
</tempUsage>
</systemUsage>
</systemUsage>
<!--
The transport connectors expose ActiveMQ over a given protocol to
clients and other brokers. For more information, see: http://activemq.apache.org/configuring-transports.html
-->
<transportConnectors>
<!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
<transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
<transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
<transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
</transportConnectors> <!-- destroy the spring context on shutdown to stop jetty -->
<shutdownHooks>
<bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
</shutdownHooks> </broker> <!--
Enable web consoles, REST and Ajax APIs and demos
The web consoles requires by default login, you can disable this in the jetty.xml file Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
-->
<import resource="jetty.xml"/> </beans>
<!-- 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. 配置django项目总结

    1.在django项目应用文件夹中的models.py文件中导入(1)from django.db import models(2)建立需要的映射的类名和属性类型也就是数据库中的表名和字段名 2.在s ...

  2. pl/sql oracle数据库中文数据显示异常或者不能使用中文查询的解决办法

    1首先我们需要找到pl/sql developer 目录 然后在该目录下 创建一个bat文件 在文件中定义 set NLS_LANG=AMERICAN_AMERICA.UTF8start PLSQLD ...

  3. 廖雪峰Git入门教程

    廖雪峰Git入门教程  2018-05-24 23:05:11     0     0     0 https://www.liaoxuefeng.com/wiki/00137395163059296 ...

  4. netty拆包粘包

    客户端 tcp udp socket网络编程接口 http/webservice mqtt/xmpp 自定义RPC (dubbo) 应用层 服务端 ServerSocket ss = new serv ...

  5. FPGA Asynchronous FIFO设计思路

    FPGA Asynchronous FIFO设计思路 将一个多位宽,且在不停变化的数据从一个时钟域传递到另一个时钟域是比较困难的. 同步FIFO的指针比较好确定,当FIFO counter达到上限值时 ...

  6. 开始转变方向,学习Linux——《Linux就该这么学》

    三十而立,四十不惑. 我呢,未立将不惑. 苦恼之余,决定拓展就业范围,正式学习Linux,准备考取RHCE证书. 考证需要报名培训机构,这是一个明智的选择,毕竟中国人善于考试,善于钻研考试. 联系培训 ...

  7. Win10系统下Anaconda下安装多种Python函数库

    建议直接安装Anaconda,这是一个包含Numpy,Pandas,Sklearn等函数库的计算机科学软件包,下面的软件可以在此环境下进行安装下载. 一.计算机视觉 1. OpenCV图像处理 在ht ...

  8. Plickers——教师拿手机、学生拿卡片,就可以完成即时全员互动!

    全员互动.立刻反馈.无设备添加.无能耗增加,风靡全球教育界,杭州师范大学硕士生导师杨俊锋教授推荐!老师拿手机,学生拿卡片就可以完成!      操作方法:      1.注册:登录www.plicke ...

  9. 找到排序矩阵中从小到大第K个数字

    一 题目描述 在一个排序矩阵中找从小到大的第 k 个整数. 排序矩阵的定义为:每一行递增,每一列也递增. 二 题解 由于排序矩阵中的每一行都是递增的,并且每一列都是递增的.从小到大第k个数,实际上就是 ...

  10. Ubuntn16.04.3安装Hadoop3.0+scale2.12+spark2.2

    Ubuntn16.04.3安装Hadoop3.0+scale2.12+spark2.2 对比参照此博文.bovenson 前言:因为安装的Hadoop.Scale是基于JAVA的应用程序,所以必须先安 ...