tag:help.appveyor.com,2012-11-13:/discussions/problems/2753-rawgithubusercontentcom-gives-server-unavailable-sporadicallyAppVeyor: Discussion 2018-08-25T01:58:59Ztag:help.appveyor.com,2012-11-13:Comment/376022452015-08-08T14:28:14Z2015-08-08T14:28:16Zraw.githubusercontent.com gives "Server Unavailable" sporadically<div><p>Sometimes (but not always), we get errors like this one:</p>
<p>appveyor DownloadFile "<a href="https://raw.githubusercontent.com/symengine/dependencies/5cff7d1736877336cf9fb58267111beea4fa152f/x86_64-4.9.1-release-posix-seh-rt_v3-rev1.7z&quot">https://raw.githubusercontent.com/symengine/dependencies/5cff7d1736...</a>;
-FileName mw64.7z<br>
Error downloading file: The remote server returned an error: (503)
Server Unavailable.</p>
<p>Here is a full log: <a href="https://ci.appveyor.com/project/certik/symengine/build/117/job/uiq1j1yiw7lwttkc">
https://ci.appveyor.com/project/certik/symengine/build/117/job/uiq1...</a></p>
<p>It is not reproducible, it only happens sometimes. But it
happened already several times.</p>
<p>Do you know how to best debug this issue? Should we for example
write a special download script, that will try to download the file
several times (with some timeout)?</p>
<p>Another solution would be to just restart this particular build,
but it seems AppVeyor only supports rebuilding the whole PR, so if
the PR has 8 builds (jobs), and 7 pass, one fails due to this
issue, then it is a waste to be rebuilding everything (and still
risking that one of the 8 jobs will fail to download the file).</p>
<p>Let me know what the best way forward is.</p>
<p>Thanks,<br>
Ondrej Certik</p></div>Ondřej Čertíktag:help.appveyor.com,2012-11-13:Comment/376022452015-08-08T14:52:28Z2015-08-08T14:52:28Zraw.githubusercontent.com gives "Server Unavailable" sporadically<div><p>When did it start happening? How many times did it happen?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/376022452015-08-08T16:18:53Z2015-08-08T16:18:54Zraw.githubusercontent.com gives "Server Unavailable" sporadically<div><p>I went into our history and here are all the failures due to
this:</p>
<p><a href="https://ci.appveyor.com/project/certik/symengine/build/117/job/uiq1j1yiw7lwttkc">
https://ci.appveyor.com/project/certik/symengine/build/117/job/uiq1...</a><br>
<a href="https://ci.appveyor.com/project/certik/symengine/build/110/job/5fdlk0xfhur50nh4">
https://ci.appveyor.com/project/certik/symengine/build/110/job/5fdl...</a><br>
<a href="https://ci.appveyor.com/project/certik/symengine/build/95/job/ywlq8n1swld1kvl9">
https://ci.appveyor.com/project/certik/symengine/build/95/job/ywlq8...</a><br>
<a href="https://ci.appveyor.com/project/certik/symengine/build/92/job/0ed4p915y2ougsr8">
https://ci.appveyor.com/project/certik/symengine/build/92/job/0ed4p...</a><br>
<a href="https://ci.appveyor.com/project/certik/symengine/build/89/job/b36fxmwdk6yw573y">
https://ci.appveyor.com/project/certik/symengine/build/89/job/b36fx...</a><br>
<a href="https://ci.appveyor.com/project/certik/symengine/build/86/job/4fjbxejh5cwapimh">
https://ci.appveyor.com/project/certik/symengine/build/86/job/4fjbx...</a><br>
<a href="https://ci.appveyor.com/project/certik/symengine/build/73/job/xknteggc3v14wh3x">
https://ci.appveyor.com/project/certik/symengine/build/73/job/xknte...</a></p>
<p>There are probably more. So it's been a few weeks. It's
definitely not a one time thing.</p>
<p>As an example of a one time thing, I found this error:</p>
<p><a href="https://ci.appveyor.com/project/certik/symengine/build/105/job/14vw4i3cq6ol0tny">
https://ci.appveyor.com/project/certik/symengine/build/105/job/14vw...</a></p>
<p>where the Python code failed to download something. It only
happened once, so it's a one time thing. The above is very regular
--- it doesn't happen every build, but it happened at least 8x (all
the links above), possibly more.</p></div>Ondřej Čertíktag:help.appveyor.com,2012-11-13:Comment/376022452015-08-11T01:09:00Z2015-08-11T01:09:00Zraw.githubusercontent.com gives "Server Unavailable" sporadically<div><p>For serving content from <code>raw.githubusercontent.com</code>
GitHub uses 3rd-party CDN provider. There were
<code>raw.githubusercontent.com</code> connectivity issues before,
but that time it looked like routing problem and the error was
client-side, kind of "Unable to connect raw.githubusercontent.com
server".</p>
<p>The error you are getting is server-side meaning we were able to
contact the server but it returns 503 (server unavailable). My
guess is that some of CDN edge servers serving that file is either
permanently or temporary down. We'll report to GitHub about
that.</p>
<p>In the meantime, I think the way to workaround this is retry
strategy. You can either wrap <code>appveyor download</code>
command in a <a href="https://gist.github.com/FeodorFitsner/508b71250295590e6408">batch
doing retries</a> or implement file download in PowerShell.</p></div>Feodor Fitsner