[BUG][JAVA] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
See original GitHub issueBug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What’s the version of OpenAPI Generator used?
- Have you search for related issues/PRs?
- What’s the actual output vs expected output?
Description
Trying to generate a quite large ~1mb Swagger-file. It had some validation issues, and I tried to fix them. Don’t know if those are relevant, since no matter if it’s fixed or not, no dice. Still «Java heap space» issue.
Relevant issue: bjerkio/tripletexjs#14 Reproduce the issue with this repository: https://github.com/bjerkio/tripletexjs/tree/reproduce
openapi-generator version
4.3.1
OpenAPI declaration file content or url
https://raw.githubusercontent.com/bjerkio/tripletexjs/reproduce/swagger-fixed.json
Command line used for generation
make generate
or
java -Xmx4G -jar openapi-generator-cli.jar \
generate \
-i ./swagger-fixed.json \
-g typescript-fetch \
-o ./out -v
Steps to reproduce
> git clone git@github.com:bjerkio/tripletexjs.git
> git checkout reproduce
> make generate
Related issues/PRs
- OpenAPITools/openapi-generator#2503
- OpenAPITools/openapi-generator#4398
- OpenAPITools/openapi-generator#5201.
Suggest a fix
I’m lost.
@bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @bkabrda
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Exception in thread "main" java.lang.OutOfMemoryError
You are short of heap space. The default heap space is not enough for your program. You need to increase your heap space...
Read more >2 solution of java.lang.OutOfMemoryError in Java - Javarevisited
Hello there, We are getting java.lang.OutOfMemoryError OUT OF SWAP SPACE in our JBoss server, exact error is this : Exception in thread "main"...
Read more >How to Handle the OutOfMemoryError in Java - Rollbar
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at OutOfMemoryErrorExample.main(OutOfMemoryErrorExample.java:8).
Read more >Java OutOfMemoryError Exceptions: Causes & Fixes [Tutorial]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at memory.JavaHeapSpace.main(JavaHeapSpace.java:5).
Read more >BUG? Java heap space error on catching an event
logError ENGINE-16004 Exception while closing command context: Java heap space java.lang.OutOfMemoryError: Java heap space at ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will be slowly looking into it step after step, trying to pick low hanging fruits first, one PR is ready #8181 reduces number of open files, closes resources much sooner. Should help, but I didn’t do any professional profiling for it.
@agilob @davija reopened. Hope we’ll get this fixed 😃
re @bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @bkabrda