Questions tagged [blockhound]

15 questions
4
votes
1 answer

Blockhound is not detecting straightforward blocking code

Using spring boot webflux, I'm trying Blockhound for a very simple blocking call, but it doesn't seem to be detecting it. io.projectreactor.tools blockhound
Monta
  • 1,136
  • 1
  • 12
  • 28
2
votes
1 answer

Blocking call caught by BlockHound on reactive MongoDB using Webflux and Kotlin

I implemented a simple CRUD using Spring Webflux, Spring data Coroutine Repository and reactive mongodb, but when I used BlockHound I got an error from a blocking call on the mongo session creation. Here is the log: …
2
votes
0 answers

Unsupported java version 61 with Blockhound && CloseableHttpClient | -AllowRedefinitionToAddDeleteMethods

At the start of the application I am spotting three warnings: Java HotSpot(TM) 64-Bit Server VM warning: Option AllowRedefinitionToAddDeleteMethods was deprecated in version 13.0 and will likely be removed in a future release. Java HotSpot(TM)…
xross
  • 597
  • 4
  • 9
  • 25
2
votes
1 answer

Blockhound Gradle: 'You need to add '-XX:+AllowRedefinitionToAddDeleteMethods' JVM flag.'

I am trying to run Blockhound in my Spring Boot app during testing. Unfortunately gradle does not pick up the required -XX:+AllowRedefinitionToAddDeleteMethods flag. I tried it using IntelliJ's VMoptions in Run Configurations as well as in…
Jonathan R
  • 3,652
  • 3
  • 22
  • 40
1
vote
0 answers

Why isn't Blockhound recognizing Ktor threads as non-blocking?

I tried to get BlockHound working with Ktor like this. BlockHound.install(CoroutinesBlockHoundIntegration()) But it doesn't detect blocking calls inside routing endpoints. Has anyone had any luck with this? I guess the problem is that Blockhound…
Kimble
  • 7,295
  • 4
  • 54
  • 77
1
vote
0 answers

Kotlin program results in error when using blockhound

I have a sceanrio wherein the code is as such: import kotlinx.coroutines.runBlocking import reactor.blockhound.BlockHound BlockHound.install() val throwable: Throwable = assertThrows { runBlocking { // Calling some…
Ishita
  • 109
  • 2
  • 10
1
vote
1 answer

Could java.io.RandomAccessFile.readBytes blocking calls be acceptable in reactive application? In which cases?

We have an application utilizing Spring WebFlux which uses Project Reactor. I ran BlockHound evaluation for the application and it reported java.io.RandomAccessFile.readBytes blocking calls in such libraries like hibernate-validator, orika mapper.…
1
vote
0 answers

How to avoid blocking call within Spring Webflux MessageSource load bundle

I have a Spring Boot application (Spring Boot version '2.5.2') using Spring Webflux and the following RestControllerAdvice: @RestControllerAdvice @RequiredArgsConstructor @Log4j2 public class CommentControllerAdvice { private final…
Andrea Damiani
  • 611
  • 1
  • 6
  • 20
1
vote
1 answer

Exception with Blockhound in Spring Webflux using Thymeleaf

When enabling Blockhound for production in my Spring Boot application, whenever I try to process a request that returns a view from thymeleaf, blockhound throws an exception (probably due to a block when reading template files from…
Basa
  • 105
  • 2
  • 15
0
votes
0 answers

Why is Blockhound detecting a blocking call after I added r2dbms to spring?

I added postgres support to my application, but when I try to run the tests, I keep getting a blocking call error from blockhound, and I'm not sure why this is happening. The application it's runs fine, only the tests fail with the blocking call…
0
votes
1 answer

BlockHound allowBlocking not working with junit5

I am using blockhound to detect blocking calls, I would like to allow my custom methods but its not working and still throwing error. i am using junit5 with blockhound-junit-platform @BeforeAll static void configureBlockHound(){ …
user3454581
  • 532
  • 1
  • 4
  • 11
0
votes
0 answers

BlockingOperationError when using multipart data through webclient

I'm trying to upload/stream multipart data to another backend service API, which received through ServerRequest in webflux. It's working fine except I'm getting following exception when enabling Blockhound to verify any non-blocking…
cool_ravi
  • 165
  • 1
  • 9
0
votes
1 answer

How I can turn on and off BlockHound check

I have some App with WebFlux and i want to use BlockHound, but i need to have a possible turn on and off it through parameter in application.properties or through spring profiling or somthing else. Also I want to override action, when the lock…
Anton
  • 57
  • 8
0
votes
0 answers

Blockhound exception occurs even with explicit schedulers

I have a similar snippet of code to scheduler an I/O on separate thread pool but unfortunately, we do need its response to decide to proceed further or not. private Response getItemsNonBlockingMethod(String id, final String path) { WebTarget…
siva
  • 1,429
  • 3
  • 26
  • 47
0
votes
0 answers

is support blockhound for cucumber & coroutine?

I have some trouble using cucumber & kotlin croutine. @Given("clean") fun clean() { BlockHound.install() runBlocking { Thread.sleep(100L) } } when I install blockhound and run sleep method in runBlock…