~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to bzrplugins/lpserve.py

[r=thumper][ui=none][bug=532213] Limit lp-serve processes to 4 gigs
        as a band aid.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
__all__ = ['cmd_launchpad_server']
12
12
 
13
13
 
 
14
import resource
14
15
import sys
15
16
 
16
17
from bzrlib.commands import Command, register_command
89
90
        from lp.codehosting.bzrutils import install_oops_handler
90
91
        from lp.codehosting.vfs import get_lp_server
91
92
        install_oops_handler(user_id)
 
93
        four_gig = int(4e9)
 
94
        resource.setrlimit(resource.RLIMIT_AS, (four_gig, four_gig))
92
95
        lp_server = get_lp_server(
93
96
            int(user_id), branchfs_endpoint_url,
94
97
            upload_directory, mirror_directory)