Skip to content
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

Java REST API crashes due to the out of memory exception #471

Open
mir-am opened this issue Jun 7, 2022 · 2 comments
Open

Java REST API crashes due to the out of memory exception #471

mir-am opened this issue Jun 7, 2022 · 2 comments

Comments

@mir-am
Copy link
Contributor

mir-am commented Jun 7, 2022

Describe the bug

The REST API is completely unresponsive when it's just launched. A simple query like http://localhost/packages does not work.

Logs

2022-06-07 10:08:21.062 DEBUG 1 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Failed to complete request: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'resolutionApi' defined in URL [jar:file:/app/rest-api.jar!/BOOT-INF/classes!/eu/fasten/analyzer/restapiplugin/api/ResolutionApi.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [eu.fasten.analyzer.restapiplugin.api.ResolutionApi]: Constructor threw exception; nested exception is java.lang.OutOfMemoryError: Java heap space
2022-06-07 10:08:21.068 ERROR 1 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'resolutionApi' defined in URL [jar:file:/app/rest-api.jar!/BOOT-INF/classes!/eu/fasten/analyzer/restapiplugin/api/ResolutionApi.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [eu.fasten.analyzer.restapiplugin.api.ResolutionApi]: Constructor threw exception; nested exception is java.lang.OutOfMemoryError: Java heap space] with root cause

java.lang.OutOfMemoryError: Java heap space

Environment (please complete the following information):

  • OS: Ubuntu 18.04
  • Java version: 11
@proksch
Copy link
Contributor

proksch commented Jun 7, 2022

Right now, it tries to instantiate the MavenResolver, which likely has issues with the new DB size. How much memory does the REST API have at the moment? Until we factor out the resolution to the micro-service, the REST API should have at least 32GB, if not more by now.

@mir-am
Copy link
Contributor Author

mir-am commented Jun 8, 2022

To give an update, with 64 GB of the heap size, the REST API still crashes. See:

$ kubectl top pod -n fasten fasten-restapi-java-5bcb74b56d-tsbv8
NAME                                   CPU(cores)   MEMORY(bytes)   
fasten-restapi-java-5bcb74b56d-tsbv8   561m         63934Mi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants