LukeMathWalker / LukeMathWalker/zero-to-production

5.4 DigitalOcean Build error out of memory

Open
#71 24 comments 13 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
6.5k
Forks
585
PR merge metrics
No merged PRs in 30d

Description

Hello,
I am on section 5.4 and I'm trying to get the app running on DigitalOcean. I am having trouble getting it to run after compiling, it compiles on DigitalOcean and then stalls for a while before issuing this error.

Build Error: Out of Memory

Your build job failed because it was out of memory.
Error code: BuildJobOutOfMemory

I went up to 4GB of RAM to see if that would change the result and it had no effect. Most searches suggest increasing memory but I imagine that other people have been able to run the app with less. Here's the last of the log:

zero2prod | 18:47:21 INFO[1231] Changed working directory to /app
zero2prod | 18:47:21 INFO[1231] Creating directory /app
zero2prod | 18:47:21 INFO[1231] Taking snapshot of files...
zero2prod | 18:47:21 INFO[1231] COPY . .
zero2prod | 18:47:21 INFO[1231] Taking snapshot of files...
zero2prod | 18:47:21 INFO[1231] COPY --from=cacher /app/target target
zero2prod | 18:47:47 INFO[1257] Taking snapshot of files...
zero2prod | 18:48:33 INFO[1303] COPY --from=cacher /usr/local/cargo /usr/local/cargo
zero2prod | 18:49:22 INFO[1352] Taking snapshot of files...

The web service doesn't expose a console, at least not during this stage, so I'm not sure how to debug the problem further, any advice would be appreciated.
Thank you. :)

Contributor guide

No contributing guide indexed for this repository

Research direction

Read section 5.4 and reproduce the DigitalOcean build using the supplied log, focusing on the COPY --from=cacher steps where it stalls. Done means identifying a reproducible cause and documenting a verified way to complete the build within the available memory.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, rust
Domain
build-system, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.