2

we are doing performance testing for our application. we are getting org.http4s.InvalidBodyException: Received premature EOF error.

The problem is we are getting only for 1-2 per of requests. The percentage will increase if we will increase rps.

The architecture of Performance application:

enter image description here

The issue can happen in 3 parts:

  1. When we send requests from prod application to Kafka
  2. In the performance application client who is firing the requests
  3. Som issue in our application

If someone faces a similar issue, please let me know.

Vimit Dhawan
  • 597
  • 1
  • 7
  • 25
  • Are all the test requests the same or they differ? – michaJlS Jun 17 '21 at 08:40
  • @michaJlS they are prod requests. the answer to your question is different. I have found one thing that we are sending a binary request with utf-8, now I have changed it to string. I assume that may be in request we have special characters and we are messing with requests. lets see if it will work – Vimit Dhawan Jun 17 '21 at 08:53
  • Did you fix the problem yourself? It looks more like a bug in request handling code than performance issue. Wrong request should yield 400 error. – michaJlS Jun 18 '21 at 12:01
  • @michaJlS we are not able to actually. but yeah you are right it's not a performance issue. It's just something we are doing wrong in request forward, performance client, and the real prod application. Actually, I want to explain more observations 1. Application is in prod and we never saw this error so I am assuming there should be not any problem. 2. The performance application which sends request used by another application also and they did not saw this issue 3. The only thing left the way we are forwarding the request and we saw some format and fixed that but still the same issue. – Vimit Dhawan Jun 18 '21 at 15:02
  • I have found these two link but looks like this is not our case 1. https://gitter.im/http4s/http4s/archives/2018/02/20 2. https://github.com/http4s/http4s/issues/563 – Vimit Dhawan Jun 18 '21 at 15:04

1 Answers1

2

we are using some libraries to send requests from the forwarder. After investigation, we found that some requests are truncate in between. When our client read the request from Kafka it reads in bytes so these are incomplete requests and our server thought it will get a new stream but it will never get and the request did not complete. it throws timeout on the client and eof on the server side. I am doing more investigation. I will update if I found something else.

Vimit Dhawan
  • 597
  • 1
  • 7
  • 25