Skip to content

Nest doesn't handle exceptions properly when http content length exceeds #945

Closed
@satishmallik

Description

@satishmallik

In my testing I am finding following,

When http content length exceeds on elasticsearch, There are 2 issues,

  1. Nest is not throwing right exception to figure http content length problem,
  2. If MaxRretry is set Nest keeps on sending requests to Elasticsearch though we know this is a non-retryable exception,

From ES I can see following logs,
org.elasticsearch.common.netty.handler.codec.frame.TooLongFrameException: HTTP content length exceeded 104857600 bytes.
at org.elasticsearch.common.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:169)
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)

But while catching Nest Exception it comes with KeepAliveFailure status and error is
"The underlying connection was closed: A connection that was expected to be kept alive was closed by the server."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions