-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Got Request execution cancelled
for every requests after an OutOfMemoryError
#2979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don't know with how much memory the application is running. But these OOM errors crash the underlying I/O system
For me it's working when increasing the memory (just using some high value, not checking where the limit is that makes it working): tasks.named('test') {
useJUnitPlatform()
jvmArgs '-Xmx16G'
} So you could increase the heap space, reduce the size of data retrieved from the index (I assume that your documents are large with with multiple smaller properties) by specifying only the needed fields with a source filter and check otherwise the memory consumption of your app to potentially reduce it. Spring Data Elasticsearch has no means to influence either the heap memory or what happens within the Elastichsearch rest client in this case. As for recovery it would be nice to have a mechanism to discard the current low level rest client and create a new one, but this is currently not possible (and I don't know if this would really in your case) |
Thanks for your reply I was wondering if there was a way to recover the connection to Elasticsearch, or if I've made a configuration error. |
Last weekend I tried to find a possibility to recreate the With the current implementation I don't see a possibility to close and recreate a |
Hi,
I found that if I have an OutOfMemoryError when querying "too big object" from elasticsearch, my application does not crash, but any further request will be cancelled with this error :
I created a sample project here https://github.com/OlivierToth-itsf/Spring-and-Es-crash .
If you run the test case
StubServiceTest.test
you will see my problem.(I made many call in parallel in order to force the OOM).
Is this a bug or I misconfigured my project ?
Configuration
Springboot: 3.3.3
Java: 17
The text was updated successfully, but these errors were encountered: