gpt4 book ai didi

ubuntu - activemq 中的内存限制 (67108864)

转载 作者:行者123 更新时间:2023-12-04 19:21:36 26 4
gpt4 key购买 nike

当涉及到 ActiveMQ 时,我遇到了问题。我需要知道我可以在哪里重新配置 Active MQ 以避免以下错误:

Usage Manager Memory Limit (67108864) reached on queue://1000010. Producers will be throttled to the rate at which messages are removed from this destination to prevent flooding it. 

请注意,我在 Ubuntu 11.10 上使用 ActiveMQ 5.5 版。

她是我的配置:
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
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-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>
</bean>

<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" useJmx="true" dataDirectory="${activemq.base}/data" destroyApplicationContextOnStop="true" schedulePeriodForDestinationPurge="0">

<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" producerFlowControl="false">
<pendingSubscriberPolicy>
<vmCursor />
</pendingSubscriberPolicy>
</policyEntry>
<policyEntry queue=">" producerFlowControl="false" maxPageSize="500" queuePrefetch="300" expireMessagesPeriod="0" queuePrefetch="1">

</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>

<managementContext>
<managementContext createConnector="false"/>
</managementContext>

<persistenceAdapter persistent="true" useShutdownHook="false">
<kahaDB directory="${activemq.base}/data/kahadb" journalMaxFileLength="32mb"/>
</persistenceAdapter>

<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage limit="1 gb"/>
</memoryUsage>
<storeUsage>
<storeUsage limit="100 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="1 gb"/>
</tempUsage>
</systemUsage>
</systemUsage>

<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
</transportConnectors>

</broker>

<import resource="jetty.xml"/>

</beans>

最佳答案

您所看到的与将非持久消息发送到队列中是一致的。这看起来像您正在达到默认内存限制。如果您将持久消息发送到队列中,他们将使用 KahaDB,因此使用 storeUsage 100gb 的限制.

顺便说一句,您有两个 queuePrefetch policyEntry 上设置的值对于所有队列 - 这可能不是您想要的。

关于ubuntu - activemq 中的内存限制 (67108864),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16673527/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com