[알림] 삭제된 동영상 및 이미지나 깨진 링크, 저작권에 문제가 될 소지가 있는 내용은 이곳에 알려주시면 바로 조치하도록 하겠습니다. 감사합니다. - Fortune Cookie
On Mon, 21 Jul 2003 11:21:38 -0700, jenny wrote:

> Hi,
>
> I have a java socket program running on AIX 4.3.3.0 platform. It opens
> a socket and sends data to our customer over a leased fractional T1
> line. The line is always connected. However, periodically, I see
> "java.IO.Exception: There is no process to read data written to a pipe"
> error message in my log file. Can anybody tell me in what cases this
> error message could occur?

This is fundamentally a Unix error. It indicates that your thread
communicates over a pipe with another process on the same machine, and
that the receiving process has closed the pipe (or has simply died).

> The other strange thing is that our customer would report that they miss
> a few messages everyday. And when I compare my log with the customer's
> log, I found that the two messages reported to be lost are actually the
> messages I sent before I see "there is no process to read data written
> to a pipe" error message every time. For example, I sent two files
> over, and no exceptions occurred; when i sent the third file, an error
> message would say "there is no process to read data written to a pipe",
> and the third message would get resent while our customer is actually
> missing the first two messages. I don't understand why I am not seeing
> any exceptions when I sent the first two messages. It looks to me that
> when I sent the first message, the link might have already been broken
> but somehow it didn't detect until the third message was sent?? Does
> anyone have an idea of why that happens or what's actually going on? I
> do a flush every time I send out a message, and I've tried to set some
> of the options like TCP_NODELAY and KEEP_SO_ALIVE, but nothing seemed to
> be working.

This is fairly easy to explain. Pipes essentially use a buffer (I think
usually 8k). The first two messages fit into this buffer, the third one is
the one that causes a buffer overflow in the pipe. That's when AIX detects
that the pipe has broken and throws the exception.

원본 http://bytes.com/forum/post63477-2.html

I don't know much about the inner workings of Java or AIX in this context,
so I can't help you find out WHY the pipe breaks.

위는 에로코드로 찾아본 웹페지이이고, 실제로는 WebSphere에서 StaleConnectionException이 발생한것인데 아래는 StaleConnectionException으로 검색해본 정보이다.

http://javaservice.net/~java/bbs/read.cgi?m=appserver&b=was&c=r_p_p&n=1164238566
더많은 검색결과 : http://www.google.co.kr/search?complete ··· %3Boq%3D


2008/10/15 11:30 2008/10/15 11:30
관련글타래
    받은 트랙백이 없고, 댓글이 없습니다. 4980번 조회되었습니다.

    댓글을 달아 주세요

    [로그인][오픈아이디란?]

    구독안내 주 2~3회 새글이 올라옵니다. 블로그 방문없이 업데이트 되는 글을 구독하세요. RSS . E-Mail . HanRSS . WZD . Google Reader . Bloglines . Delicious Bookmark this on Delicious
    [알림] 삭제된 동영상 및 이미지나 깨진 링크, 저작권에 문제가 될 소지가 있는 내용은 이곳에 알려주시면 바로 조치하도록 하겠습니다. 감사합니다. - Fortune Cookie
    Connection reset by peer: socket write error

    (A) Connection reset by peer: JVM_recv in socket input stream read
    Socket으로부터 read() operation을 수행할 당시, N/W level에서의 IOException이
    발생한 경우입니다.
    (B) Connection reset by peer: socket write error
    Socket으로 write() operation을 수행할 때, 앞서와 같이 N/W level에서의 IO 에러가
    발생한 경우입니다.

    Java Stack Trace 전체를 올려주지 않으셨기에, 위 에러가 어느 구간에서 발생한
    것인지는 알수 없으나, 다음 중 하나이겠지요.

    PC <--(1)--> WebServer <--(2)--> Tomcat <--(3)--> Database

    질문하신 분은 구간(3)일 것이라 가정하고 있지만, 구간(1)을 거친 구간(2)에서
    발생했을 가능성이 가장 높습니다. 이같은 상황은, 응답이 느린 응용어플리케이션이나
    혹은 '동시단말사용자수'가 증가하여 시스템의 '임계성능'에 도달하여 전체적으로
    응답속도가 느려질 경우, 사용자는 응답이 미처 오기전에 'Stop/Forward/Backward'
    버튼을 누르거나 혹은 다른 사이트로 이동해 버릴 수 있습니다.
    이 경우에 PC로부터 넘어가는 데이타를 모두 Tomcat이 받지 못할 경우에 (A)상황을
    직면하게 되며, 일단 요청이 '접수'되어 일정한 오랜 시간동안 동작된 해당 처리의
    결과를 사용자PC에게 HTTP result를 보내려고 하나 이미 사용자PC 측의 Socket peer가
    사라졌으로(close) (B)상황인 Socket write IO errer를 발생하는 것입니다.

    따라서, 해당 메세지가 빈번하지 않을 경우는 무시하시면 되고, 반면, 사용자 증가에
    따라 부하가 극심한 시점에 위와 같은 메세지가 동시다발적으로 발생하고 있다면,
    (메세지가 뿌려지는 것은 어찌보면 당연한 것이며,) 응용어플리케이션 혹은 해당 시스템의
    '임계성능'을 끌어올리는 성능개선작업을 하셔야 할 것입니다.
    이 경우는 앞선분이 질문하신 상황과 동일할 것입니다.

    PS: 해당 메세지는 Tomcat의 버전 및 JVM의 버전에 따라 약간씩 다를 수 있습니다.

    자바서비스넷 이원영
    http://www.javaservice.net/~java/bbs/read.cgi?m=appserver&b=engine&c=r_p&n=1039391439&p=1&s=t#1039391439
    2006/12/11 13:11 2006/12/11 13:11
    관련글타래
      받은 트랙백이 없고, 댓글이 없습니다. 2108번 조회되었습니다.

      댓글을 달아 주세요

      [로그인][오픈아이디란?]

      구독안내 주 2~3회 새글이 올라옵니다. 블로그 방문없이 업데이트 되는 글을 구독하세요. RSS . E-Mail . HanRSS . WZD . Google Reader . Bloglines . Delicious Bookmark this on Delicious