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
Amass go API free resources #508
Comments
It seems as though Not sure if this was an intentional omission from the Shutdown function, but I'm currently running into this as well. sys, err := systems.NewLocalSystem(cfg)
if err != nil {
return nil, fmt.Errorf("failed to create new local system: %s", err)
}
defer sys.Pool().Stop() // this is the missing piece
defer sys.Shutdown() I do see that the call to stop the pool was part of the Shutdown function, but for some reason it seems to be commented out as of It still seems like there's a memory leak somewhere else though, when using Amass as a library like this |
Looks like the e.Bus.Stop() These measures alone appear to be ineffective in addressing the memory and/or goroutine leaks though... |
After doing some profiling (
By default Ultimately, many of these factors probably stem from this library's primary use in a command-line utility, which typically have little concern for memory stability. |
@steers We do migrate the graph database to a local db on disk. It would great to discuss these topics with you further on Discord. Will you join the Amass Discord server? |
Is there something left to complete for this issue? |
No. Sorry for the late. |
I started to use the Amass API as part of my go code. My code never stops, because it is running the builtin HTTP server.
My code came from the example code.
Amass seems like dont free the allocated sources, ~100 goroutines always added when i call my function and the memory slowly get full.
My function that always been called:
How to free the memory, stop Amass goroutines after this function return?
The text was updated successfully, but these errors were encountered: