Giter VIP home page Giter VIP logo

Comments (4)

sbordet avatar sbordet commented on June 7, 2024

It is not normal.

The client by default does not have any rate control limit: it must be explicitly configured, and I assume it is not.

Could it be that the client application cancels every stream it creates, and the server is flooded with resets, and eventually exceeds the max events per second?

Is there a way we can reproduce the issue and take a closer look?

Can you enable client-side DEBUG logs to understand why the client resets the streams?

from jetty.project.

iamsanjay avatar iamsanjay commented on June 7, 2024

jetty.txt

Could it be that the client application cancels every stream it creates, and the server is flooded with resets, and eventually exceeds the max events per second?

Yes client is the one flooding server with RST_STREAM. Further investigation took me to the below code where the limit is checked.

private boolean onReset(ByteBuffer buffer, int error)
{
ResetFrame frame = new ResetFrame(getStreamId(), error);
if (!rateControlOnEvent(frame))
return connectionFailure(buffer, ErrorCode.ENHANCE_YOUR_CALM_ERROR.code, "invalid_rst_stream_frame_rate");

from jetty.project.

iamsanjay avatar iamsanjay commented on June 7, 2024

Upon your suggestion, I enabled the logs at "org.eclipse.jetty" and got to know that there is a possibility, I am still debugging, that we may have been closing the InputStream bit early before we receive all the DataFrame and that is what, I guess, leading to send RST_FRAME. Below is the snippet of code where we are reading the InputStream.

https://github.com/apache/solr/blob/62cf3aaef34ba8f0437dbc355457e367488c8a99/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java#L1831-L1850

from jetty.project.

sbordet avatar sbordet commented on June 7, 2024

@iamsanjay from the logs I came to the same conclusion, that you are not reading the whole content.

I can see from the logs that 250 bytes are received and consumed, but the next 4 bytes are not read, and are discarded because the input stream is being closed.

It is really important that you read until the InputStream reads -1.

This means that if you are parsing JSON, and the 250 bytes would represent a full JSON document (so from the point of view of the application you have all the relevant data), you still have 4 bytes to read and you still have to read the -1 (end-of-file).

Closing the InputStream earlier would lead to a reset being sent to the server.

from jetty.project.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.