Build: Switch to Docker for deployment.
Originally the motivation as the try fly.io, but I suspect the build failure is due to some exotic way SBCL allocates memory. See https://old.reddit.com/r/lisp/comments/d7rlx/ask_rlisp_do_any_cl_implementations_work_well_on/ where others say setting --dynamic-space-size to 256 for 256MB was the ideal solution. It explains well why the same docker image is able to be build on my local PC, via a custom Heroku buildpack, and via fly.io's remote servers. However it fails to start properly on fly.io's VM's. I suspect this is because their free tier starts at 256MB RAM. They have a very generous free tier and the people who work there seem amazing. But if my application crashes, that's obviously a non-starter. They still have the fresh start-up energy to them, so I'll check back within a couple years. Debian images take 400MB memory. Cannot be deployed on Fly io servers due to memory restrictions. The same image will work fine with 512MB (locally, on Fly.io and Heroku) but the VM will crash with 256MB. This is probably because I am forced to compile the exectuable with --dynamic-space-size 2048 MB as a lot of memory is allocated during =project-isidore/model:create-search-index=. If I set it any lower, SBCL heap will be exhausted while compiling. For the Lispworks implmentation there exists [[http://www.lispworks.com/documentation/lw70/LW/html/lw-502.htm#25516][clean-down]], but the closest SBCL has is =sb-ext:dynamic-space-size= and is not able to be dynamically set after the SBCL process has started. Anyways, since my custom Heroku buildpack amounted to 150 lines of bash scripts, I thought I might as well use Docker instead... and the resulting Dockerfile is 14 lines long. The necessary changes have also been made in the Github Actions runner.
Loading
Please register or sign in to comment