[logback-user] Hang with SMTPAppender

Jeff Jensen jjensen at apache.org
Sat Aug 14 15:23:33 CEST 2010

Tying up loose ends... so many problems later!

I started resolving the needed compile deps to run
SMTPAppender_SubethaSMTPTest, but never finished.  I found that having a
DEBUG logger on org.subethamail causes the test to hang, as simple as:

  <logger name="org.subethamail" level="DEBUG" />

My guess is the tiny bit of extra processing of its messages must cause a
race condition to miss reading the response (?).

Any chance of adding the timeout attribute to SMTP appender?  I still think
it is a good idea, and would like to set it.

-----Original Message-----
From: logback-user-bounces at qos.ch [mailto:logback-user-bounces at qos.ch] On
Behalf Of Ceki Gülcü
Sent: Friday, July 23, 2010 11:17 AM
To: logback users list
Subject: Re: [logback-user] Hang with SMTPAppender

On 23/07/2010 5:46 PM, Jeff Jensen wrote:
> Hi Ceki, thanks for the reply.

> Yes, I upgraded to 0.9.24 while investigating this problem. I must have
> captured the stack before that.


> I wondered about a race condition too. To try mitigate that at
> SubethaSMTP start/shutdown, I added Thread.sleep(10000) calls after
> start and before shutdown. There was no change; is 10 seconds long
> enough to wait to see if a shutdown server is the problem?

Yes, 10 seconds is more than enough.

> Any suggestion for setting the timeout value via Logback?

As I mentioned in my previous mail, we also use SubethaSMTP for testing 
purposes. See SMTPAppender_SubethaSMTPTest [1]. Could you copy and paste 
   SMTPAppender_SubethaSMTPTest into your environment and see if it runs 
properly? If it runs OK, I suggest comparing the code in 
SMTPAppender_SubethaSMTPTest with your test code.


Logback-user mailing list
Logback-user at qos.ch

More information about the Logback-user mailing list