commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Parks" <>
Subject RE: [Email] Email send hangs thread indefinitely on intermittent failure
Date Sat, 21 Aug 2010 18:37:21 GMT
Thanks for the reply Siegfried.

I did not have any timeout settings for my test. But it looks like these
settings are available only in 1.3 dev, not the release build (I'm using

I didn't quite follow how to make use of the first two options

But in any case do you (or does anyone) know how stable 1.3 is? Is this
problem solvable in 1.2? Perhaps there are defaults on these values in 1.3?


-----Original Message-----
From: Siegfried Goeschl [] 
Sent: Saturday, August 21, 2010 12:05 AM
To: Commons Users List
Subject: Re: [Email] Email send hangs thread indefinitely on intermittent

Hi David,

don't know if you have set any timeouts for your tests such as

+) Email.setSocketConnectionTimeout()
+) Email.setSocketTimeout()

The first two go into the email session for (javax.mail) while the two
others are set directly on Email - see


Siegfried Goeschl

PS: Agreed on the fact the you should not hang indefinitely with a default

On 21.08.10 05:23, David Parks wrote:
> I set up a simple test to send 50 emails through google app's SMTP server
> with a short delay between them (just testing to see what I'm allowed to
> do).
> I set this up by opening 50 threads and pausing at different intervals for
> each thread.
> I notice that I sometimes end up with a thread that hangs indefinitely on
> connection that seems to be hung, but never times out (see the thread dump
> below for one such case, it's been left hung for>  10 min now):
> Any thoughts on this? Kind of scares me to think what might happen to a
> server posting emails in the background. I would expect network timeouts
> all be handled at least with a default value by a simplifying wrapper
> such as this is. Or am I missing some logic here maybe?
> Thanks,
> David
> Thread [Thread-23] (Suspended)	
> 	SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int)
> line: not available [native method]	
>[], int, int) line: not available	
> 	InputRecord.readFully(InputStream, byte[], int, int) line: not
> available	
>, OutputStream) line: not available	
> 	SSLSocketImpl.readRecord(InputRecord, boolean) line: not available
> 	SSLSocketImpl.readDataRecord(InputRecord) line: not available	
>[], int, int) line: not available	
>[], int, int) line: 106	
> 	BufferedInputStream.fill() line: not available	
> line: not available	
> 	LineInputStream.readLine() line: 84	
> 	SMTPTransport.readServerResponse() line: 1903	
> 	SMTPTransport.issueSendCommand(String, int) line: 1808	
> 	SMTPTransport.finishData() line: 1634	
> 	SMTPTransport.sendMessage(Message, Address[]) line: 889	
> 	Transport.send0(Message, Address[]) line: 191	
> 	Transport.send(Message) line: 120	
> 	HtmlEmail(Email).sendMimeMessage() line: 1232	
> 	HtmlEmail(Email).send() line: 1267	
> 	GoogleAppsEmailTest.sendEmail(int) line: 51	
> 	GoogleAppsEmailTest$ line: 17	
> line: not available	
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message