Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle client idle timeout to prevent abundant logging #2373

Closed
erikvanoosten opened this issue Aug 8, 2023 · 19 comments
Closed

Handle client idle timeout to prevent abundant logging #2373

erikvanoosten opened this issue Aug 8, 2023 · 19 comments
Labels

Comments

@erikvanoosten
Copy link
Contributor

erikvanoosten commented Aug 8, 2023

Applications that use the http client keep seeing logging every few minutes (using version 3.0.0-RC2+45-e3636f00-SNAPSHOT):

logger: "io.netty.channel.DefaultChannelPipeline"
message: "An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception."
stack_trace: "io.netty.handler.timeout.ReadTimeoutException: null"

They always comes in groups of 10 with just a few ms between them. There is never a request going on at that time. According to @vigoo the groups of 10 means that all connections in the connection pool time out at the same time (it has a default size of 10).

I would prefer not to have these warnings logged.

Of course, these warning could be suppressed using the logging framework, but handling this in zio-http gives a better developer experience for all users.

@vigoo suggests to handle the timeout so it does not get logged. Probably in the client inbound handler.

See Discord discussion.

@erikvanoosten erikvanoosten added the enhancement New feature or request label Aug 8, 2023
@jdegoes
Copy link
Member

jdegoes commented Aug 17, 2023

/bounty $50

@algora-pbc
Copy link

algora-pbc bot commented Aug 17, 2023

💎 $50 bounty created by ZIO
🙋 If you start working on this, comment /attempt #2373 to notify everyone
👉 To claim this bounty, submit a pull request that includes the text /claim #2373 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to zio/zio-http!

Attempt Started (GMT+0) Solution
🔴 @Mayhul-Jindal Aug 21, 2023, 9:25:06 AM WIP
🔴 @joshuallopez Aug 21, 2023, 4:02:30 PM WIP
🔴 @an0nym3sh Sep 26, 2023, 10:59:51 AM WIP
🔴 @sanjulaonline Nov 23, 2023, 4:13:52 AM WIP
🔴 @Vayras Dec 11, 2023, 2:18:07 PM WIP
🟢 @ekhov Jan 13, 2024, 11:47:55 PM #2619

@Mayhul-Jindal
Copy link

Mayhul-Jindal commented Aug 21, 2023

/attempt #2373

Options

1 similar comment
@joshuallopez
Copy link

joshuallopez commented Aug 21, 2023

/attempt #2373

Options

@algora-pbc
Copy link

algora-pbc bot commented Aug 21, 2023

Note: The user @Mayhul-Jindal is already attempting to complete issue #2373 and claim the bounty. If you attempt to complete the same issue, there is a chance that @Mayhul-Jindal will complete the issue first, and be awarded the bounty. We recommend discussing with @Mayhul-Jindal and potentially collaborating on the same solution versus creating an alternate solution.

joshuallopez added a commit to joshuallopez/zio-http that referenced this issue Aug 21, 2023
Whenever a ReadTimeoutException is thrown, the specific handling code within the case match will be executed. For now, I've left it to do nothing (i.e., it'll just swallow the exception). If you'd like to handle it in some other manner, like logging it at a different severity or executing some custom logic, replace the comment with the appropriate code.
@joshuallopez joshuallopez mentioned this issue Aug 21, 2023
@algora-pbc
Copy link

algora-pbc bot commented Aug 28, 2023

@Mayhul-Jindal: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

@algora-pbc
Copy link

algora-pbc bot commented Aug 28, 2023

@joshuallopez: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

@algora-pbc
Copy link

algora-pbc bot commented Sep 4, 2023

The bounty is up for grabs! Everyone is welcome to /attempt #2373 🙌

@an0nym3sh
Copy link

an0nym3sh commented Sep 26, 2023

/attempt #2373

Options

@algora-pbc
Copy link

algora-pbc bot commented Oct 3, 2023

@an0nym3sh: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

@algora-pbc
Copy link

algora-pbc bot commented Oct 10, 2023

The bounty is up for grabs! Everyone is welcome to /attempt #2373 🙌

@sanjulaonline
Copy link

sanjulaonline commented Nov 23, 2023

/attempt #2373

Options

Copy link

algora-pbc bot commented Nov 30, 2023

@sanjulaonline: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

Copy link

algora-pbc bot commented Dec 7, 2023

The bounty is up for grabs! Everyone is welcome to /attempt #2373 🙌

@Vayras
Copy link

Vayras commented Dec 11, 2023

Hi @jdegoes , I would like to work on this issue can you please assign me to this? /attempt #2373

Options

Vayras added a commit to Vayras/zio-http that referenced this issue Dec 11, 2023

Verified

This commit was signed with the committer’s verified signature.
MylesBorins Myles Borins
Copy link

algora-pbc bot commented Dec 25, 2023

The bounty is up for grabs! Everyone is welcome to /attempt #2373 🙌

@ekhov
Copy link
Contributor

ekhov commented Jan 13, 2024

/attempt #2373

Options

Copy link

algora-pbc bot commented Jan 14, 2024

💡 @ekhov submitted a pull request that claims the bounty. You can visit your bounty board to reward.

ekhov added a commit to ekhov/zio-http that referenced this issue Jan 14, 2024

Verified

This commit was signed with the committer’s verified signature.
MylesBorins Myles Borins
On idle timeout for NettyConnectionPool handle ReadTimeoutExceptions-
just log them with debug level, so they don't propagate as unhandled errors further
Copy link

algora-pbc bot commented Jan 16, 2024

🎉🎈 @ekhov has been awarded $50! 🎈🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants