You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
we use joern --server to start joern query server, but it can run out of memory if joern server run after a long time.
To Reproduce
Steps to reproduce the behavior:
./joern server
request query many many times, the query return a batch of many many json
after a long time
the server hold many many memory, it can't release the memory
run out of my memory in computer
Additional context
I think we can't simply start with joern --server -J-Xmx${N}G to solve the problem, because my workstation server has 1000G memory, I use -J-Xmx500G, the memory will also be up to 500G+
I think I have guessed the reason.
the repl-server simulate a REPL interpreter. Evaluates a expression query every time, it will print a temp variable (with some counter suffix name), like
res27 = ....
if you evaluate again, it will print res28
res28 = ...
we can always use REPL to Forward Reference the temp variable res0, res1, ..., res27, res28, ... resN ..., it will never be released, it will always exists in the memory.
But in server mode, we just want to evaluate a expression and return, and soon release the temp variable memory.
I don't know how to solve the problem. Maybe it is a inherent problem in the REPL.
Thank you for your attention!
The text was updated successfully, but these errors were encountered:
Describe the bug
we use
joern --server
to start joern query server, but it can run out of memory if joern server run after a long time.To Reproduce
Steps to reproduce the behavior:
./joern server
Additional context
I think we can't simply start with
joern --server -J-Xmx${N}G
to solve the problem, because my workstation server has 1000G memory, I use-J-Xmx500G
, the memory will also be up to 500G+I think I have guessed the reason.
the
repl-server
simulate a REPL interpreter. Evaluates a expression query every time, it will print a temp variable (with some counter suffix name), likeif you evaluate again, it will print
res28
we can always use
REPL
toForward Reference
the temp variableres0
,res1
, ...,res27
,res28
, ...resN
..., it will never be released, it will always exists in the memory.But in server mode, we just want to evaluate a expression and return, and soon release the temp variable memory.
I don't know how to solve the problem. Maybe it is a inherent problem in the REPL.
Thank you for your attention!
The text was updated successfully, but these errors were encountered: