gpt4 book ai didi

elasticsearch - WSO2 log4j 和 Elasticsearch : all carbon apps freeze

转载 作者:行者123 更新时间:2023-12-03 00:10:40 25 4
gpt4 key购买 nike

我注意到我的 wso2 应用程序(esb 4.9、AM 1.10 和 GREG 5.0.0)中有一个非常奇怪的行为
每次停止 elasticsearch/logstash 时,所有 carbon 应用程序都会卡住。
他们变得完全没有反应,阻止他们的唯一方法是发送杀戮 -9

我的 conf 非常标准(见下文),所以我想知道我是否遗漏了什么,或者其他人是否注意到了同样的问题。

log4j.rootLogger=INFO, CARBON_CONSOLE, CARBON_LOGFILE, CARBON_MEMORY,tcp

log4j.appender.tcp=org.apache.log4j.net.SocketAppender
log4j.appender.tcp.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
log4j.appender.tcp.layout.ConversionPattern=[%d] %P%5p {%c} – %x %m%n
log4j.appender.tcp.layout.TenantPattern=%U%@%D[%T]
log4j.appender.tcp.Port=6000
log4j.appender.tcp.RemoteHost=localhost
log4j.appender.tcp.ReconnectionDelay=10000
log4j.appender.tcp.threshold=DEBUG
log4j.appender.tcp.Application=esb500wso2carbon

最佳答案

文件说了什么:

Logging events are automatically buffered by the native TCP implementation. This means that if the link to server is slow but still faster than the rate of (log) event production by the client, the client will not be affected by the slow network connection. However, if the network connection is slower then the rate of event production, then the client can only progress at the network rate. In particular, if the network link to the the server is down, the client will be blocked.

On the other hand, if the network link is up, but the server is down, the client will not be blocked when making log requests but the log events will be lost due to server unavailability.



但在我的情况下,即使“服务器关闭”,客户端有时也会被阻塞,因为许多 java 线程被阻塞在同一个锁对象上

看看 JMSAppender 或 AsyncAppender

关于elasticsearch - WSO2 log4j 和 Elasticsearch : all carbon apps freeze,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41016721/

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