Merge lp:~mbp/launchpad/690021-rlimit into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Robert Collins | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 12991 | ||||
Proposed branch: | lp:~mbp/launchpad/690021-rlimit | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
21 lines (+5/-0) 1 file modified
cronscripts/scan_branches.py (+5/-0) |
||||
To merge this branch: | bzr merge lp:~mbp/launchpad/690021-rlimit | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Martin Pool (community) | Disapprove | ||
Tim Penhey (community) | Needs Information | ||
Michael Hudson-Doyle | Approve | ||
Review via email: mp+43733@code.launchpad.net |
Commit message
[r=lifeless,
Description of the change
This change limits the address space of scan_branches.py to 2GB. If it tries to allocate more, it will crash. See <https:/
After some discussion with spm and mwh on irc this seemed like a good idea. It is consistent with what we do in other scripts.
2Gb is a compromise between I hope being small enough to stop the machine bogging down, but not so small that scans that would otherwise succeed will now fail.
It would be nice if the limit was not hard coded, but this seems like the most pragmatic thing for now. I added a note on https:/
Obviously this will not actually fix whatever the bad scaling behaviour is in bug 690021; we should probably split that to a separate bug.
I would welcome opinions on how to test this. Do these jobs run on staging or qastaging? Perhaps we should just let it get to production and then watch for it to fail cleanly.
I tested this locally, and it didn't explode:
mbp@lp-lucid% ./cronscripts/ scan_branches. py launchpad- runscanbranches .lock scan_branches. py 7.02s user 0.55s system 71% cpu 10.547 total
2010-12-15 07:53:37 INFO Creating lockfile: /var/lock/
2010-12-15 07:53:43 INFO Running synchronously.
./cronscripts/
I think it's ok to merge. Apparently we now have pqm permission, but I have not yet tried it.