This repository has the code to reproduce this micronaut issue.
It implements a Micronaut 4.1.x service that counts the number of bytes of https://micronaut.io/launch landing page.
Use Java 17. You may reproduce it in two different ways.
- Run tests:
./gradlew test --info
- Check that, when the delay matches the read timeout (1.9s), the requests start failing.
- Run service:
./gradlew run
- In a new terminal run the delayed curls:
while true; do /usr/bin/time curl localhost:8080 -w "\n" echo "---sleeping 1.9s---"; sleep 1.9 done
- Check that some requests fail. Try changing the sleep to see that the service works fine otherwise.