How to reduce memory usage for Meteor?

I created a very simple Meteor web application (v1.0.1, development mode) that resides on a staging server so only a few users have access to it. The server is on Rackspace and has 1GB of memory.

When I come back from my weekend break, I get this error:

FATAL ERROR: Evacuation Allocation failed - process out of memory Aborted (core dumped)

      

I restarted the application and started top

. I can see that I only have 70MB of memory left, and the top three processes are from a meteor taking up almost 60% of the memory. The second process (15517) continues to grow in memory (9.7 on first run, up to 10.6 per hour) and I feel like this could lead to an out of memory (OOM) error.

  PID USER   PR   NI   VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND                                         
15445 root   20   0 1367736 443624   2792 S 10.3 43.8   6:09.26 [dir]/.meteor/packages/meteor-tool/.1.0.36.1rumazb++os.linux.+
15517 root   20   0  830796 107040   3172 R  3.0 10.6   1:07.75 [dir]/.meteor/packages/meteor-tool/.1.0.36.1rumazb++os.linux.+
15468 root   20   0  813608  36348   1824 S  0.3  3.6   0:04.82 [dir]/.meteor/packages/meteor-tool/.1.0.36.1rumazb++os.linux.+

      

I asked in another question what these processes are doing, but in this question I want to focus on , what can I do to reduce Meteor's memory usage? Is there a way to limit the amount of memory that can be allocated to Meteor to prevent this fatal error? This is a very simple application.

+3


source to share





All Articles