Understanding smtp server response
843830Dec 15 2003 — edited Jan 15 2004Hi,
I like to check with anyone who might be able to advise me on the problem below.
I have a servlet which uses JavaMail to send out emails to a smtp server. During our peak access hours, we have many requests to send out emails, after a while my application went into CLOSE WAIT accumulation and finally my application server stops processing.
When i did a thread dump, i found quite a number of threads still occupied with the process below. Does it mean that this is a symptom of network bottleneck where the smtp server is not responding as fast to the client and hence holding up the rest of the threads ? Is JavaMail send() method a synchronous call that has to wait for a server response before the thread is released ? Or is this a case of my network problem ?
"ExecuteThread: '11' for queue: 'default'" daemon prio=5 tid=0x39fb28 nid=0x18 runnable [0xbf980000..0xbf981a38]
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:85)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:181)
at java.io.BufferedInputStream.read(BufferedInputStream.java:199)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:56)
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:929)
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:878)
at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:820)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:322)
at javax.mail.Transport.send0(Transport.java:164)
at javax.mail.Transport.send(Transport.java:81)