-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Out of control memory usage #1014
Comments
We've looked in to this some. I suspect two things:
We are still considering whether AIML should remain a default. you can disable it by renaming the file: |
perhaps the aiml skill should provide the saved brain file instead of making it in the first run we could make a minimal brain, the current AIML skill uses a lot of files that could be curated to at least remove things that would be triggered by default skills (jokes come to mind) instead of using direct copy pasta of ALICE/mitsuku chatbot perhaps a repository for extra AIML files could be made and keep the default skill minimal a self.reload_skill = False would also help in this case with not reloading |
I've disabled writing/loading brain file for the moment and I'm forcing unload of aiml-kernel at shutdown as a quick fix for this specific problem. Skill should be updated automatically. A forced upgrade can be made using I still need to find the root cause why the loaded data isn't cleaned up when shutting down skills, if it's a bug in the aiml module or if there remains references to the old skill object after reload. |
Short update, I've checked and the unloaded skills doesn't seem to get garbage collected (added a
Some of these can be caused by self references but likely not all. |
Created a minimal test for the issue: https://gist.github.com/forslund/44eccf583091afacb810e7cae08cafad |
One obvious thing is that the handler for 'stop.mycroft' isn't teared down but even with this I don't see any difference. Edit: I can remove it no problem. problem is only with methods registered with |
http://imgur.com/a/0TZ71 Shows the problem I think. In this case I've used the If I skip the |
I've set this up on two machines now, a desktop x86_64 system and an ARM development board and in both cases, within a few minutes, it had used up all of the RAM on the system.
Here it is on the ARM system (with 2GB of RAM) after roughly 3 minutes:
Within a few seconds of pasting that, the system killed the process due to OOM.
The text was updated successfully, but these errors were encountered: