Exceptions with parallel queries while running in OpenShift

131 Views Asked by At

We're running a Spring Boot application with R2DBC MSSQL connection to an Azure SQL database. We addded a feature that basically does a JOIN in code (please disregard all performance issues here ;-)) and now we experience exceptions if this code is deployed to our OpenShift environment (If I run the same code on my machine everything is fine).

The exception is org.springframework.dao.DataAccessResourceFailureException: executeMany; SQL [SELECT * FROM equipment WHERE json_value(data, '$.installation.projectId') = @P0_synthetic0]; null (Full StackTrace here).

What I've found out so far is that the problematic code issues the queries in parallel like

findAllThings()
    .flatMap(lookupForOneThing)
    ...

if I change the code to work more sequential like

findAllThings()
    .collectList()
    .flatMapIterable(it)
    .flatMap(lookupForOneThing)
    ...

the error is gone in OpenShift as well.

Does anyone has an idea what's going on here?

0

There are 0 best solutions below