-
Notifications
You must be signed in to change notification settings - Fork 7
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
Pre-processing leaks memory #58
Comments
I'm assuming that this is some sort of problem involving dying vms. I'll have to make some test cases and see what's up. |
Looks like a preprocessor need not even do anything to leak memory, just merely be referenced from the page. Below is the contents of such a preprocessor and it's memory consumption after several hours (the drop at the end is from a restart): /* player */
//{ url: insta_vid_list[random].url, username: insta_vid_list[random].username} |
After increasing the VM's memory size to 1GB, the memory usage on Carrie peaked at 557MB after 5 hours. Also, I was never able to experience a memory leak on my machine, after a full day of playing around and trying different configurations. I think Solidus is just hungry. Each worker can take up to 70mb of memory, from what I could tell. The rest of the system would need to be tested, to see where that memory is used. |
After digging through the code, I can't find any real problem. The memory grows simply because memory is available, V8 doesn't bother releasing it. For example, when I trace the memory usage:
And do the same thing, but I force a garbage collection after the templates are loaded (big drop in memory):
Forcing garbage collection is not really a solution, we should let V8 take care of that. But, we can tell it the maximum memory it can use:
I'll send an email to Modulus about this. It doesn't make sense to start a Node process on a 396mb machine, without changing the default |
The text was updated successfully, but these errors were encountered: