[nodejs] Error: EPIPE, Broken pipe

1,254 views
Skip to first unread message

Tautologistics

unread,
Apr 30, 2010, 9:46:41 PM4/30/10
to nodejs
In 0.1.93 I noticed the script (HTTP server) quitting if a client
closed the connection early. Flipping back to 0.1.92 I see this error
spit out:

node http server: Error: EPIPE, Broken pipe

In both versions I've tried trapping the "error" event on the
httpServer as well as the request.connection (stream) with no luck.
I'm even checking the request.connection.readyState before sending
anything to the client but it never even gets to that code in the
request "end" event handler.

Where can I trap this error event so that I can stop node from
quitting?

--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.

Tim Caswell

unread,
Apr 30, 2010, 11:32:17 PM4/30/10
to nod...@googlegroups.com
I wonder if that's what keeps killing howtonode.org. Every few hours it just stops.

Elijah Insua

unread,
Apr 30, 2010, 11:37:05 PM4/30/10
to nod...@googlegroups.com
Eek, this seems like a pretty serious issue.  

Jason Davies

unread,
May 4, 2010, 7:03:45 AM5/4/10
to nodejs
Some unexplained issue is doing the same to my homepage too, it just
dies every so often without throwing any exceptions.

On May 1, 4:32 am, Tim Caswell <t...@creationix.com> wrote:
> I wonder if that's what keeps killing howtonode.org.  Every few hours it just stops.
>
> On Apr 30, 2010, at 8:46 PM, Tautologistics wrote:
>
>
>
>
>
> > In 0.1.93 I noticed the script (HTTP server) quitting if a client
> > closed the connection early. Flipping back to 0.1.92 I see this error
> > spit out:
>
> > node http server: Error: EPIPE, Broken pipe
>
> > In both versions I've tried trapping the "error" event on the
> > httpServer as well as the request.connection (stream) with no luck.
> > I'm even checking the request.connection.readyState before sending
> > anything to the client but it never even gets to that code in the
> > request "end" event handler.
>
> > Where can I trap this error event so that I can stop node from
> > quitting?
>
> > --
> > You received this message because you are subscribed to the Google Groups "nodejs" group.
> > To post to this group, send email to nod...@googlegroups.com.
> > To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/nodejs?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/nodejs?hl=en.

Debacker

unread,
May 4, 2010, 12:10:10 PM5/4/10
to nod...@googlegroups.com
Did you try "signal(SIGPIPE, SIG_IGN);" (in C, of course) ?

Ryan Dahl

unread,
May 4, 2010, 1:34:00 PM5/4/10
to nod...@googlegroups.com
Is there anyway you could put together a little test for this? (Or at
least something I could use to repeat?)

Ryan Dahl

unread,
May 4, 2010, 1:38:43 PM5/4/10
to nod...@googlegroups.com
On Tue, May 4, 2010 at 9:10 AM, Debacker <deba...@gmail.com> wrote:
> Did you try "signal(SIGPIPE, SIG_IGN);" (in C, of course) ?


I thought we were ignoring sigpipe, but this comment reminded me that
it got removed when deps/evcom was pulled out.

http://github.com/ry/node/commit/c72967d3351c4a28c3f2434748598017aa0126d5#L10L1900

Ryan Dahl

unread,
May 4, 2010, 1:47:20 PM5/4/10
to nod...@googlegroups.com
On Tue, May 4, 2010 at 10:38 AM, Ryan Dahl <coldre...@gmail.com> wrote:
> On Tue, May 4, 2010 at 9:10 AM, Debacker <deba...@gmail.com> wrote:
>> Did you try "signal(SIGPIPE, SIG_IGN);" (in C, of course) ?
>
>
> I thought we were ignoring sigpipe, but this comment reminded me that
> it got removed when deps/evcom was pulled out.
>
> http://github.com/ry/node/commit/c72967d3351c4a28c3f2434748598017aa0126d5#L10L1900
>

I re-ignored it in b6c5cf6.

Chris Winberry

unread,
May 4, 2010, 1:49:15 PM5/4/10
to nod...@googlegroups.com

When I get to my hotel I can create a test. In the mean time it can be triggered by creating a web server that delays the response for a moment, running "ab" with 5+ concurrent requests, then killing "ab" with ^c while it is running requests.

On May 4, 2010 1:34 PM, "Ryan Dahl" <coldre...@gmail.com> wrote:

Is there anyway you could put together a little test for this? (Or at
least something I could use to repeat?)


--
You received this message because you are subscribed to the Google Groups "nodejs" group.

To po...

Tautologistics

unread,
May 4, 2010, 2:45:17 PM5/4/10
to nodejs
http://gist.github.com/389784

I can not get this to occur as a node-only script so "ab" is needed.
Happens 90% of the time when "ab" is terminated early.

Looking into the packets caps now to see exactly what's transpiring
here.

On May 4, 1:49 pm, Chris Winberry <cpt.obvi...@gmail.com> wrote:
> When I get to my hotel I can create a test. In the mean time it can be
> triggered by creating a web server that delays the response for a moment,
> running "ab" with 5+ concurrent requests, then killing "ab" with ^c while it
> is running requests.
>

Chris Winberry

unread,
May 7, 2010, 7:13:19 AM5/7/10
to nodejs

This is fixed in 0.1.94.

On May 4, 2010 2:45 PM, "Tautologistics" <cpt.o...@gmail.com> wrote:

http://gist.github.com/389784

I can not get this to occur as a node-only script so "ab"  is needed.
Happens 90% of the time when "ab" is terminated early.

Looking into the packets caps now to see exactly what's transpiring
here.


On May 4, 1:49 pm, Chris Winberry <cpt.obvi...@gmail.com> wrote:

> When I get to my hotel I can cre...

> On May 4, 2010 1:34 PM, "Ryan Dahl" <coldredle...@gmail.com> wrote:
>

> Is there anyway you could ...

> --

> You received this message because you are subscribed to the Google Groups "nodejs" group.

> To post to this group, send email to nod...@googlegroups.com.

> To unsubscribe from this group, se...

> For more options, visit this group athttp://groups.google.com/group/nodejs?hl=en.


--
You received this message because you are subscribed to the Google Groups "nodejs" group.

To post to this group, send email to nod...@googlegroups.com.

To unsubscribe from this group, send e...

Reply all
Reply to author
Forward
0 new messages