Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java mail: set

Problem: email thread is hanging at socket read
Today we found a email problem in production, all of the mail threads (3 threads) are hanging/sitting/blocking at same point
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
- locked <0x9698d6c0> (a java.io.BufferedInputStream)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:56)
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:757)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:673)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:168)
at javax.mail.Service.connect(Service.java:227)
at javax.mail.Service.connect(Service.java:131)
at javax.mail.Service.connect(Service.java:87)
at com.sun.mail.smtp.SMTPTransport.connect(SMTPTransport.java:105)
- locked <0x9698d6e0> (a com.sun.mail.smtp.SMTPTransport)
at javax.mail.Transport.send0(Transport.java:162)
at javax.mail.Transport.send(Transport.java:80) 
I search the "javax.mail.Transport.send" and "com.sun.mail.smtp.SMTPTransport.readServerResponse", got no hits.
while my colleague get answer from internet. 
http://jira.sakaiproject.org/browse/KNL-96
http://forums.sun.com/thread.jspa?forumID=43&threadID=474662
"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."
"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.


Ïà¹ØÎĵµ£º

½«javaÏîÄ¿Éú³Éexe¿ÉÖ´ÐÐÎļþÈ«¹ý³Ì

½«javaÏîÄ¿Éú³Éexe¿ÉÖ´ÐÐÎļþÈ«¹ý³Ì
2009Äê05ÔÂ10ÈÕ ÐÇÆÚÈÕ 16:30
Ò»¡¢Ê×ÏÈΪeclipse°²×°fatjar²å¼þ£¨Èç¹ûÄãµÄjarÏîÄ¿ÖÐÐèÒªÓõ½Í¼Æ¬¡¢Íⲿ³ÌÐòµÈÎļþʱҪÓô˲å¼þ´ò°ü³ÌÐò²ÅÄÜÕý³£ÔËÐУ©
°²×°·½Ê½ÓÐÁ½ÖÖ£º·½·¨1£ºÔÚÏß°²×°£¨ÍƼö£©
²½Ö裺
eclipse²Ëµ¥À¸ help >software updates >Find and install >Search f ......

JavaÖÐËÄÖÖXML½âÎö¼¼Êõ

DOMÊÇ»ùÓÚÆ½Ì¨¡¢ÓïÑÔÎ޹صĹٷ½W3C±ê×¼¡£»ùÓÚÊ÷µÄ²ã´Î£¬ÆäÓŵãÊÇ¿ÉÒÔÒÆÖ²£¬±à³ÌÈÝÒ×£¬¿ª·¢ÈËÔ±Ö»ÐèÒªµ÷Óý¨Ê÷µÄÖ¸Áî¡£ÆäȱµãÊǼÓÔØ´óÎļþ²»ÀíÏë¡£
¡¡¡¡SAXÊÇ»ùÓÚʼþÄ£Ð͵ģ¬ËüÔÚ½âÎö XML ÎĵµµÄʱºò¿ÉÒÔ´¥·¢Ò»ÏµÁеÄʼþ£¬µ±·¢ÏÖ¸ø¶¨µÄtagµÄʱºò£¬Ëü¿ÉÒÔ¼¤»îÒ»¸ö»Øµ÷·½·¨£¬¸æË߸÷½·¨Öƶ¨µÄ±êÇ©ÒѾ­ÕÒµ½¡£ÀàËÆÓëÁ÷ýÌåµÄ½ ......

javaÖеļ̳Ð

1.¼Ì³Ð£ºÊÇÖ¸ÏÈ´´½¨Ò»¸ö¹²ÓÐÊôÐÔµÄÒ»°ãÀ࣬¸ù¾Ý¸ÃÒ»°ãÀàÔÙ´´½¨¾ßÓÐÌØÊâÊôÐÔµÄÐÂÀ࣬ÐÂÀà¼Ì³ÐÒ»°ãÀàµÄ״̬ºÍÐÐΪ£¬²¢¸ù¾ÝÐèÒªÔö¼Ó×Ô
            ¼ºµÄеÄ״̬ºÍÐÐΪ
            Óɼ̳жøµÃµ½µÄÀà³ ......

JAVA±à³Ì¹æ·¶

1. Ó¦Ó÷¶Î§
±¾¹æ·¶Ó¦ÓÃÓÚ²ÉÓÃJ2EE¹æ·¶µÄÏîÄ¿ÖУ¬ËùÓÐÏîÄ¿ÖеÄJAVA´úÂ루º¬JSP£¬SERVLET£¬JAVABEAN£¬EJB£©¾ùÓ¦×ñÊØÕâ¸ö¹æ·¶¡£Í¬Ê±£¬Ò²¿É×÷ΪÆäËüÏîÄ¿µÄ²Î¿¼¡£
2. Éè¼ÆÀàºÍ·½·¨
2.1     ´´½¨¾ßÓкÜÇ¿ÄÚ¾ÛÁ¦µÄÀà
·½·¨µÄÖØÒªÐÔÍùÍù±ÈÀàµÄÖØÒªÐÔ¸üÈÝÒ×Àí½â£¬·½·¨ÊÇÖ¸Ö´ÐÐÒ»¸öͳһº¯ÊýµÄÒ»¶Î´úÂë¡£Àà³£± ......

JAVA¶àÏß³Ì

package debug;import java.io.*;import java.lang.Thread;class MyThread extends Thread{  public int x = 0;  public void run(){    System.out.println(++x);  }}class R implements Runnable{  private int x = 0;  public void run(){    System.out.printl ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ