mitkins

mitkins

Out of memory error when deploying Geolix config when deploying to fly.io

I’ve upgraded my Pheonix app to 1.6 so I can test deployment with https://fly.io. Almost everything is up and running. However, when I re-add my Geolix config:

config :geolix, databases: [%{
  id: :dynamic_city,
  adapter: Geolix.Adapter.MMDB2,
  source: nil,
  init: {Zoinks.Geolix, :database}
}]

I get the following error message after the new image is scaled up:

2021-12-29T03:30:30.000 [info] Configuring virtual machine
2021-12-29T03:30:30.000 [info] Pulling container image
2021-12-29T03:30:31.000 [info] Unpacking image
2021-12-29T03:30:31.000 [info] Preparing kernel init
2021-12-29T03:30:31.000 [info] Configuring firecracker
2021-12-29T03:30:32.000 [info] Starting virtual machine
2021-12-29T03:30:32.000 [info] Starting init (commit: 7943db6)...
2021-12-29T03:30:32.000 [info] Preparing to run: `/bin/sh -c /app/bin/server` as nobody
2021-12-29T03:30:32.000 [info] 2021/12/29 03:30:32 listening on [fdaa:0:32ca:a7b:2984:8cc8:6b30:2]:22 (DNS: [fdaa::3]:53)
2021-12-29T03:30:33.000 [info] Reaped child process with pid: 547, exit code: 0
2021-12-29T03:30:36.000 [info] [    3.980196] Out of memory: Killed process 515 (beam.smp) total-vm:1890308kB, anon-rss:168232kB, file-rss:0kB, shmem-rss:82096kB, UID:65534 pgtables:672kB oom_score_adj:0
2021-12-29T03:30:36.000 [info] Main child exited normally with code: 137
2021-12-29T03:30:36.000 [info] Seaped child process with pid: 568 and signal: SIGUSR1, core dumped? false
2021-12-29T03:30:36.000 [info] Starting clean up.
2021-12-29T03:30:43.000 [info] Starting instance
2021-12-29T03:30:43.000 [info] Configuring virtual machine
2021-12-29T03:30:43.000 [info] Pulling container image
2021-12-29T03:30:44.000 [info] Unpacking image
2021-12-29T03:30:44.000 [info] Preparing kernel init
2021-12-29T03:30:44.000 [info] Configuring firecracker
2021-12-29T03:30:45.000 [info] Starting virtual machine
2021-12-29T03:30:45.000 [info] Starting init (commit: 7943db6)...
2021-12-29T03:30:45.000 [info] Preparing to run: `/bin/sh -c /app/bin/server` as nobody
2021-12-29T03:30:45.000 [info] 2021/12/29 03:30:45 listening on [fdaa:0:32ca:a7b:2984:8cc8:6b30:2]:22 (DNS: [fdaa::3]:53)
2021-12-29T03:30:46.000 [info] Reaped child process with pid: 547, exit code: 0
2021-12-29T03:30:47.000 [error] Health check status changed 'passing' => 'critical'
2021-12-29T03:30:48.000 [info] Reaped child process with pid: 568 and signal: SIGUSR1, core dumped? false
2021-12-29T03:30:48.000 [info] [    3.230681] Out of memory: Killed process 515 (beam.smp) total-vm:1890712kB, anon-rss:167988kB, file-rss:4kB, shmem-rss:82264kB, UID:65534 pgtables:680kB oom_score_adj:0
2021-12-29T03:30:49.000 [info] Main child exited normally with code: 137
2021-12-29T03:30:49.000 [info] Starting clean up.

1 desired, 1 placed, 0 healthy, 1 unhealthy [restarts: 2] [health checks: 1 total]
v12 failed - Failed due to unhealthy allocations - not rolling back to stable job version 12 as current job has same specification

So I assume this is happening because Geolix runs on startup and the memory required exceeds that of the basic firecracker. Is there something I can do to load Geolix differently - such that I can use the default firecracker?

First Post!

al2o3cr

al2o3cr

There’s a startup_sync option in Geolix 1.1 and higher, but that may just delay the problem until a little later in the boot process.

Where Next?

Popular in Questions Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31307 143
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement