ActiveMq Windows 配置优化
最近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&wireFormat.maxFrameSize=104857600"/>
- <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
- <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
- <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
- <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&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 配置优化的更多相关文章
- TOMCAT 8.5 配置优化以及JVM配置(windows server)
下载官方的tomcat,我这里用的是TOMCAT 8.5.46,然后解压出来,解压后的目录如下图 一.server.xml配置优化 进入conf目录,打开server.xml 文件 1. 找到 < ...
- PHPSTORM/IntelliJ IDEA 常用 设置配置优化
PHPSTORM/IntelliJ IDEA 常用 设置配置优化 - meetrice 时间 2014-09-06 10:17:00 博客园-所有随笔区 原文 http://www.cnblogs ...
- windows tomcat 优化
windows tomcat 优化 1. tomcat conf server.xml 在server.xml中修改以一部分,增加节点数目,可以很好的提高性能: <Connector port ...
- nginx配置优化 第二章
一:常用功能优化: 1:网络连接的优化: 只能在events模块设置,用于防止在同一一个时刻只有一个请求的情况下,出现多个睡眠进程会被唤醒但只能有一个进程可获得请求的尴尬,如果不优化,在多进程的ngi ...
- 如何优化tomcat配置优化
tomcat默认参数是为开发环境制定,而非适合生产环境,尤其是内存和线程的配置,默认都很低,容易成为性能瓶颈. tomcat内存优化 linux修改TOMCAT_HOME/bin/catalina.s ...
- IIS服务器与web.config配置优化指南
摘自: http://www.3lian.com/edu/2012/11-13/43890.html .修改IIS最大工作进程数 a. 请考虑以下几点: .每一个工作进程都会消耗系统资源和CPU占用率 ...
- Android零基础入门第13节:Android Studio配置优化,打造开发利器
原文:Android零基础入门第13节:Android Studio配置优化,打造开发利器 是不是很多同学已经有烦恼出现了?电脑配置已经很高了,但是每次运行Android程序的时候就很卡,而且每次安装 ...
- OOM和JVM配置优化
OOM这个缩写就是Java程序开发过程中让人最头痛的问题:Out of Memory.在很多开发人员的开发过程中,或多或少的都会遇到这类问题,这类问题定位比较困难,往往需要根据经验来判断可能出现问题的 ...
- 站点部署,IIS配置优化指南[转]
站点部署,IIS配置优化指南 目录 一. 设置应用程序池默认设置 二. 常规设置 三. 优化回收策略 四. 性能 五. IIS初始化(预加载 ...
随机推荐
- js/php判断移动端还是PC端
if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobi ...
- Java高级特性 第14节 解析XML文档(2) - SAX 技术
一.SAX解析XML文档 SAX的全称是Simple APIs for XML,也即XML简单应用程序接口.与DOM不同,SAX提供的访问模式是一种顺序模式,这是一种快速读写XML数据的方式.当使用S ...
- 1.1.27 word表格里的文字不显示
1.问题: 下载其他人做的表格后,在表格内打字,字不显示. 2.解决方案: 产生这种问题的原因是,该表格设置的字体,你的电脑未安装. a.将隐藏文字选中,设为[宋体]或其他已经安装字体. b.下载[方 ...
- tcpdump+wireshark抓包分析
上一篇文章中,我们介绍了tcpdump如何抓包. tcpdump是命令行下便捷的抓包和分析工具,但使用方式不够友好, wireshark是带图形化界面的抓包和分析工具,操作简便,但需要主机有显示器. ...
- HanLP中文分词Lucene插件
基于HanLP,支持包括Solr(7.x)在内的任何基于Lucene(7.x)的系统. Maven <dependency> <groupId>com.hankcs.nlp&l ...
- windows 时间服务器配置详解
最近发现公司的服务器时间一直不准确,也无法和外部时间源进行同步.公司是域环境,按理说客户端PC应该自动和域控AD进行时间同步,但是PC机时间老是不能同步,不是慢了就是快了,就是和域控时间不一致.其它服 ...
- jquery 一键复制文本到剪切板
<a id="copy" data-clipboard-text="123456">复制文本</a> $(function(){ var ...
- 常用git的命令
常用git的命令 详解git fetch与git pull的区别 Git放弃本地所有修改,强制更新: git fetch --all git reset --hard origin/master 说明 ...
- <ROS> message_filters 对齐多种传感器数据的时间戳
联合标定三维雷达和IMU,第一步要先对齐两种传感信息的时间戳. ros官网提供了message_filters用于对齐多种传感信息的时间戳. http://wiki.ros.org/message_f ...
- Java8-Optional与null
对null进行处理 程序中经常需要对null情况进行处理,比如Course类中有一个List stuList属性,Student有一个name属性. 现在想要查看某个student的name属性的长度 ...