Closed
Bug 1272183
Opened 9 years ago
Closed 9 years ago
Busy loop in autophonetreeherder
Categories
(Testing Graveyard :: Autophone, defect)
Testing Graveyard
Autophone
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: gbrown, Assigned: gbrown)
References
Details
Attachments
(1 file)
1.33 KB,
patch
|
bc
:
review+
|
Details | Diff | Splinter Review |
The treeherder submission server loops, sleeping following failed submissions. But following successful submissions, there is no sleep, even if there are no jobs available, resulting in a tight loop, and high cpu use.
This is a regression from bug 1267531.
![]() |
Assignee | |
Comment 1•9 years ago
|
||
Currently serve_forever() calls jobs.get_next_treeherder_job() in a tight loop unless post_request() fails. Prior to bug 1267531, serve_forever() would sleep for retry_wait seconds between calls to jobs.get_next_treeherder_job().
In this patch, I'm sleeping for just 1 second between job retrieval attempts -- I think it's enough of a rest, keeps job submission snappy, and decouples avoiding-a-busy-loop from wait-after-failure (retry_wait).
This significantly reduces autophone cpu usage for me.
Attachment #8751798 -
Flags: review?(bob)
Comment 2•9 years ago
|
||
Comment on attachment 8751798 [details] [diff] [review]
sleep between calls to jobs.get_next_treeherder_job()
Review of attachment 8751798 [details] [diff] [review]:
-----------------------------------------------------------------
r+. great! I'd noticed the cpu issue but hadn't looked into it yet. Thanks for fixing it already!
Attachment #8751798 -
Flags: review?(bob) → review+
![]() |
Assignee | |
Comment 3•9 years ago
|
||
Blocks: autophone-deployments
Comment 4•9 years ago
|
||
deployed 2016-05-12 14:00:00
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•3 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•