Limiting memory usage

28 October 2008

This site is hosted by webfaction. They are a particularly good host for django applications, and I'm very happy with the way things have gone as I set up the site.

The account that I have with them gives me only a limited amount of memory which my applications can use. I hadn't realised that I was close to this limit, and last night when I tried to import my subversion repository I exceeded it, and my processes (including this website) were stopped. I've since discovered the ulimit command (good instructions here) which specifies the maximum amount of memory that processes can use.

Basically the process that I used to do the import was this:

login to the webfaction shell

stop all but the most important processes

run this command: ulimit -v 60000

(new processes can use up to roughly 60MB)

then run the svnadmin command to import the repository from the dump file.

This time the process worked without a hitch, and my repository is now working in the new location.