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

exchange core showing java.lang.OutOfMemoryError:Java Heap Space #107

Open
shanhashcah opened this issue Oct 18, 2021 · 6 comments
Open

Comments

@shanhashcah
Copy link

Hi @mzheravin

I am running exchange-core and there is huge number of offers lets say 467314 . And continuously users are placing orders and trading them. But my tomcat server throwing java.lang.OutOfMemoryError:Java Heap Space error after running certain time. If I restart the server then it will be ok but again it will throw that error.

Any suggestion how exchange-core can handle this bulk offers in production.

Thanks

@shanhashcah
Copy link
Author

Hi @mzheravin any suggestion about my issue.

@ghost
Copy link

ghost commented Oct 21, 2021

Hello,
i guess a heap analysis must begin with your favorite profiler, how much finalizer instance do you have ? etc etc

@shanhashcah
Copy link
Author

That I need to check. But I have not changed the code, it is cloned from exchange-core. Here in production there are huge offers . So is this handle by exchange-core?

@ghost
Copy link

ghost commented Oct 22, 2021

Hello,
did you check your JVM heap size ?? you can increase it.
A full profiling would be necessary as well.
regards
david

@mzheravin
Copy link
Collaborator

@shanhashcah you can make a heapdump and check its structure.
Apart from exchange core components, maybe some other objects are keept in memory?
How many symbols do you have?
What orderbook implementation are you using?

@shanhashcah
Copy link
Author

shanhashcah commented Oct 27, 2021

Thank you @mzheravin for your response.

In my project there are 183 symbols.

I am using below code for orderbook implementation
L2MarketData snapshot = orderBookNaiveImpl.getL2MarketDataSnapshot(Integer.MAX_VALUE);

One more thing I would like to share that there are around 5-6 Lac offers.

Thanks

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

3 participants
@mzheravin @shanhashcah and others