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

[BUG][JAVA] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space #6597

Closed
4 of 5 tasks
simenandre opened this issue Jun 9, 2020 · 10 comments · Fixed by #8731
Closed
4 of 5 tasks

Comments

@simenandre
Copy link

simenandre commented Jun 9, 2020

Bug 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
Suggest a fix

I'm lost.

@bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @bkabrda

@simenandre
Copy link
Author

Any updates on this?

@jtrueblood-anaqua
Copy link

Hey cobraz,

We are experiencing the same issue. I'm going to gather info an post in a few.

Thanks,
Jeff

@simenandre
Copy link
Author

@jtrueblood-anaqua Did you get some info to post?

@simenandre
Copy link
Author

Bump ❤️

@simenandre
Copy link
Author

Closing this. We have moved away from this library.

@davija
Copy link

davija commented Dec 11, 2020

Can we please re-open this? The issue still exists and should be fixed without respect to the original poster using this library or not.

@davija
Copy link

davija commented Dec 11, 2020

FYI, one thing I found to get around this was:

  • Use a 64-bit JDK/JRE
  • Set an environment variable for JAVA_OPTS="-Xmx4g"
    • (or some other amount of memory... starting at 2g and incrementing until you can get one to finish)

@simenandre simenandre reopened this Dec 22, 2020
@simenandre
Copy link
Author

@agilob @davija reopened. Hope we'll get this fixed :)

re
@bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @bkabrda

@agilob
Copy link
Contributor

agilob commented Dec 23, 2020

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.

@wing328
Copy link
Member

wing328 commented Feb 17, 2021

I've filed #8731 to workaround the issue for the time being.

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

Successfully merging a pull request may close this issue.

5 participants