a8n: replacer service responds with 503 with cold cache
Created by: mrnugget
When previewing a campaign over a large number of repositories and the replacer
cache in /tmp/replacer-archives
is empty, replacer
might respond with 503 Service Unavailable
.
Example: with a fresh Sourcegraph instance, locally, I ran the following CampaignPlan:
{
"scopeQuery": "repo:github",
"matchTemplate": "foobar",
"rewriteTemplate": "barfoo"
}
That resulted in 173 campaign jobs.
Out of those, 17 resulted in the mentioned error:
# SELECT error FrOM campaign_jobs WHERE error != '';
error
-----------------------------------------------------------------------------
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"
unexpected response status from replacer service: "503 Service Unavailable"