[SERVER-11654] Automatically garbage collect JS Created: 10/Nov/13 Updated: 10/Dec/14 Resolved: 10/Nov/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript, Shell |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Participants: |
| Description |
|
When connections (Mongo instances in the shell) are null'd they are not automatically garbage collected, as an example. There are probably other examples out there too.
|
| Comments |
| Comment by Scott Hernandez (Inactive) [ 11/Nov/13 ] |
|
Something seems wrong if after 2 hours the connection isn't garbage collected and closed, without a manual gc() call. In node.js and others V8 embedders they use the v8::V8::IdleNotification() call to periodically allow V8 to do its work at idle times. I'd sat we hook into the shell and call IdleNotification when we print the prompt and maybe when we return a scope back to the pool in general. |
| Comment by Eliot Horowitz (Inactive) [ 10/Nov/13 ] |
|
This is an implementation detail of v8, and not something we will adjust. |