I'm playing around with setting up an alternate file domain for our Phabricator installation using CloudFront. Whilst doing so, I uploaded a dummy 1GB file to this installation and attempted to download the file immediately afterwards using arc download. My reason for doing so was in an attempt to understand whether arbitrary files would be served through the CDN. In doing so, however, I hit an exception:
> arc download --conduit-uri https://secure.phabricator.com --trace F5039656 ARGV '/home/josh/workspace/github.com/phacility/arcanist/bin/../scripts/arcanist.php' 'download' '--conduit-uri' 'https://secure.phabricator.com' '--trace' 'F5039656' LOAD Loaded "phutil" from "/home/josh/workspace/github.com/phacility/libphutil/src". LOAD Loaded "arcanist" from "/home/josh/workspace/github.com/phacility/arcanist/src". Config: Reading user configuration file "/home/josh/.arcrc"... Config: Did not find system configuration at "/etc/arcconfig". Working Copy: Reading .arcconfig from "/home/josh/workspace/REDACTED/.arcconfig". Working Copy: Path "/home/josh/workspace/REDACTED" is part of `git` working copy "/home/josh/workspace/REDACTED". Working Copy: Project root is at "/home/josh/workspace/REDACTED". Config: Did not find local configuration at "/home/josh/workspace/REDACTED/.git/arc/config". Loading phutil library from '/home/josh/workspace/REDACTED/support/flarc/src'... >>> [0] <conduit> user.whoami() <bytes = 117> >>> [1] <http> https://secure.phabricator.com/api/user.whoami <<< [1] <http> 777,690 us <<< [0] <conduit> 778,620 us >>> [2] <conduit> file.search() <bytes = 171> >>> [3] <http> https://secure.phabricator.com/api/file.search <<< [3] <http> 252,815 us <<< [2] <conduit> 252,933 us DATA Downloading "F5039656" (1,073,741,824 byte(s))... >>> [4] <http> https://p.phcdn.net/file/data/@secure/vnfphk6aw5b4pl52nu7l/PHID-FILE-gjgmogxhmwkz6ftww7ru/test.img <<< [4] <http> 43,564,789 us Getting file information... >>> [5] <conduit> file.info() <bytes = 138> >>> [6] <http> https://secure.phabricator.com/api/file.info <<< [6] <http> 759,008 us <<< [5] <conduit> 759,176 us Downloading file 'test.img' (1,073,741,824 bytes)... >>> [7] <conduit> file.download() <bytes = 169> >>> [8] <http> https://secure.phabricator.com/api/file.download <<< [8] <http> 13,098,890 us <<< [7] <conduit> 13,099,005 us [2017-07-09 23:48:44] EXCEPTION: (HTTPFutureHTTPResponseStatus) [HTTP/500] Internal Server Error >>> UNRECOVERABLE FATAL ERROR <<< Out of memory (allocated 5752750080) (tried to allocate 1431655909 bytes) /core/lib/libphutil/src/utils/utils.php:1168 ┻━┻ ︵ ¯\_(ツ)_/¯ ︵ ┻━┻ at [<phutil>/src/future/http/BaseHTTPFuture.php:339] arcanist(head=master, ref.master=3c4735795a29), flarc(), phutil(head=stable, ref.master=310a831f97ab, ref.stable=62a2730aefc0) #0 BaseHTTPFuture::parseRawHTTPResponse(string) called at [<phutil>/src/future/http/HTTPSFuture.php:422] #1 HTTPSFuture::isReady() called at [<phutil>/src/future/Future.php:37] #2 Future::resolve(NULL) called at [<phutil>/src/future/FutureProxy.php:34] #3 FutureProxy::resolve() called at [<phutil>/src/conduit/ConduitClient.php:64] #4 ConduitClient::callMethodSynchronous(string, array) called at [<arcanist>/src/workflow/ArcanistDownloadWorkflow.php:264] #5 ArcanistDownloadWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]