Hello,

 I am facing one strange issue and not able to find the solution. I am
using logabck with syslog in karaf container. Issue is logs are not written
when testing with high performance. I am using logback - syslog in apache
karaf container.

In normal scenario, everything works fine, but when i change the log level
to debug and try to do some performance tests, logs write is stopped at
some point and it never writes. The issue is happening because of the
logging framework. We are using Syslog logging framework, which actually
writes the logs to the socket and later that would write to a file.

In this particular scenario, after a particular time, the logs have been
stopped writing but can see that there are sockets open which are waiting
to write the logs to the file.

Any solution or pointers to resolve the issue would be very helpful.

*O/P of netstat -p command showed 151 connections in CLOSE_WAIT state:*

....................
tcp 1 0 172.30.2.144:39830 172.30.2.144:pcsync-https CLOSE_WAIT 3513/java
tcp 1 0 172.30.2.144:39965 172.30.2.144:pcsync-https CLOSE_WAIT 3513/java
............
tcp 0 0 localhost:41277 localhost:pcsync-https CLOSE_WAIT 3640/java
tcp 0 0 localhost:44855 localhost:pcsync-https CLOSE_WAIT 3640/java
tcp 0 0 localhost:41891 localhost:pcsync-https CLOSE_WAIT 3640/java
...................................

*logback.xml*

<configuration>
 ........................................................
    <appender name="karaf" class="ch.qos.logback.classic.net.SyslogAppender">
    <facility>LOCAL1</facility>
    <syslogHost>localhost</syslogHost>
    <suffixPattern>karaf: [%thread] %logger{36} - %msg%n</suffixPattern>
</appender>
<appender name="shared" class="ch.qos.logback.classic.net.SyslogAppender">
    <facility>LOCAL1</facility>
    <syslogHost>localhost</syslogHost>
    <suffixPattern>shared: [%thread] %logger{36} - %msg%n</suffixPattern>
</appender>
<appender name="css2" class="ch.qos.logback.classic.net.SyslogAppender">
    <facility>LOCAL1</facility>
    <syslogHost>localhost</syslogHost>
    <suffixPattern>css2: [%thread] %logger{36} - %msg%n</suffixPattern>
</appender>
......................................................
</configuration>

Reply via email to