-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Hi, I'm getting some issues when I try to fetch more than one million of rows. I'm Using Spring 3.1.2 Java 17 with webflux.
The code that I'm using to fetch a page is the following:
`
return RxJava3Adapter.flowableToFlux(database
.select(queryString)
.fetchSize(10000)
.get(resultSet -> {
ResultSetMetaData metaData = resultSet.getMetaData();
int columnCount = metaData.getColumnCount();
return Flux.<Map<String, Object>>create(emitter -> {
try {
while (resultSet.next()) {
Map<String, Object> row = new HashMap<>();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = resultSet.getObject(i);
row.put(columnName, columnValue);
}
emitter.next(row);
}
emitter.complete();
} catch (SQLException sqlException) {
emitter.error(sqlException);
}
});
})).flatMap(flux -> flux);`
I'm trying to figure what's wrong and why is getting this out of memory exception.
The exception that is throwing is
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "RxCachedWorkerPoolEvictor-1"
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested