question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Occasional "broken pipe" error in ember server

See original GitHub issue

Occasionally, I am getting following error when running wrk on http4s server with ember backend

java.io.IOException: Broken pipe
	at java.base/sun.nio.ch.FileDispatcherImpl.write0(Native Method)
	at java.base/sun.nio.ch.SocketDispatcher.write(Unknown Source)
	at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
	at java.base/sun.nio.ch.IOUtil.write(Unknown Source)
	at java.base/sun.nio.ch.IOUtil.write(Unknown Source)
	at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishWrite(Unknown Source)
	at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(Unknown Source)
	at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(Unknown Source)
	at java.base/sun.nio.ch.EPollPort$EventHandlerTask.run(Unknown Source)
	at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
	at delay @ fs2.io.net.SocketCompanionPlatform$AsyncSocket.$anonfun$write$1(SocketPlatform.scala:137)
	at async @ fs2.io.net.SocketCompanionPlatform$AsyncSocket.go$2(SocketPlatform.scala:131)
	at flatMap @ fs2.io.net.SocketCompanionPlatform$AsyncSocket.go$2(SocketPlatform.scala:141)
	at modify @ fs2.internal.Scope.close(Scope.scala:262)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:162)
	at deferred @ fs2.concurrent.Topic$.apply(Topic.scala:144)
	at acquire @ fs2.Stream.go$11(Stream.scala:1922)

Setup:

  • Scala 2.13.8
  • Cats Effect 3.3.8
  • Fs2 3.2.5
  • Http4s 0.23.11

Mentioned error is not logged by logger and is thrown time to time (seems randomly). I wonder what could have caused it? Setup of process running wrk is as follows, wrk opens one connection to http4s server, and 100 instances of wrk script are run in parallel on same linux container. Each wrk process connects to different url path on same server.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
armanbilgecommented, Jul 9, 2022

@retriku do you still have this issue with the latest Cats Effect as well? Seems to me it was the changes in Cats Effect v3.3.8 which caused this behavior and has since been improved. See:

1reaction
FloWicommented, Jul 9, 2022

Btw: thanks for working on http4s, @armanbilge and others. I really enjoy working with it. The documentation is awesome compared to other open source projects!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ember Client sometimes failing with `org.http4s.ember.core ...
server [ERROR] org.http4s.ember.client.internal. ... IOException: Broken pipe occurring on client calls with empty bodies ...
Read more >
[Solved] Broken Pipe Error With SSH Connection in Linux
SSH connection getting disconnected due to inactivity? Here's how to handle it.
Read more >
1308295 – Unresolved OpenSSH ControlMaster multiplexing ...
I tried to install openssh-7.2*.rpm openssh-clients-*.rpm openssh-server-*.rpm, but would not succeed unless using `rpm -i --force` due to ...
Read more >
http4s/http4s - Gitter
Hey all - I want to send a post request with no body using the blaze client but its giving the error: org.http4s.MalformedMessageBodyFailure:...
Read more >
Changelog - Cypress Documentation
Cypress now throws an error if any Cypress commands are invoked from ... Added support for advanced dev server configuration via an async...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found