# Question about weird deployment size on fly

**URL:** <https://community.fly.io/t/question-about-weird-deployment-size-on-fly/5677>\
**Category:** Questions / Help\
**Created:** [June 17, 2022, 10:54am UTC](https://community.fly.io/t/question-about-weird-deployment-size-on-fly/5677 "2022-06-17T10:54:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![abeeshake](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/abeeshake/32/11492_2.png) [@abeeshake](https://community.fly.io/u/abeeshake)\
**Post date:** [June 17, 2022, 10:54am UTC](https://community.fly.io/t/question-about-weird-deployment-size-on-fly/5677/1 "2022-06-17T10:54:43Z")

</div>

I just deployed an simple elixir app. (no phoenix)  
Just `mix new --sup` stuff

It calls telelgram api and uses `ex_gram` as dependency.

after `fly launch`, it uses `heroku buildpack` and later I get weird log message.

```auto
image: registry.fly.io/evenbot:deployment-1655462762
image size: 828 MB

```

`_build` folder on my machine is `5 MB`. But in this image, it is 828 MB ?

It feels I have missed something. What could it be?

---

<div class="post-metadata">

**Author:** ![abeeshake](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/abeeshake/32/11492_2.png) [@abeeshake](https://community.fly.io/u/abeeshake)\
**Post date:** [June 17, 2022, 10:56am UTC](https://community.fly.io/t/question-about-weird-deployment-size-on-fly/5677/2 "2022-06-17T10:56:18Z")

</div>

```auto

 1 desired, 1 placed, 0 healthy, 1 unhealthy [restarts: 2] [health checks: 1 total]
Failed Instances

Failure #1

Instance
ID PROCESS VERSION REGION DESIRED STATUS HEALTH CHECKS RESTARTS CREATED
c695904a 0 maa run running 1 total 2 1m10s ago

Recent Events
TIMESTAMP TYPE MESSAGE
2022-06-17T10:51:05Z Received Task received by client
2022-06-17T10:51:05Z Task Setup Building Task Directory
2022-06-17T10:51:34Z Started Task started by client
2022-06-17T10:51:42Z Terminated Exit Code: 0
2022-06-17T10:51:42Z Restarting Task restarting in 1.193302765s
2022-06-17T10:51:50Z Started Task started by client
2022-06-17T10:51:58Z Terminated Exit Code: 0
2022-06-17T10:51:58Z Restarting Task restarting in 1.038512743s
2022-06-17T10:52:05Z Started Task started by client

2022-06-17T10:52:11Z [info]Interactive Elixir (1.13.4) - press Ctrl+C to exit (type h() ENTER for help)
2022-06-17T10:52:11Z [info]10:52:11.825 [debug]
2022-06-17T10:52:11Z [info]>>> REQUEST >>>
2022-06-17T10:52:11Z [info](no query)
2022-06-17T10:52:11Z [info]Content-Type: application/json
2022-06-17T10:52:11Z [info]%{}
2022-06-17T10:52:11Z [info]<<< RESPONSE <<<
2022-06-17T10:52:11Z [info]server: nginx/1.18.0
2022-06-17T10:52:11Z [info]date: Fri, 17 Jun 2022 10:52:11 GMT
2022-06-17T10:52:11Z [info]content-type: application/json
2022-06-17T10:52:11Z [info]content-length: 68
2022-06-17T10:52:11Z [info]connection: keep-alive
2022-06-17T10:52:11Z [info]strict-transport-security: max-age=31536000; includeSubDomains; preload
2022-06-17T10:52:11Z [info]access-control-allow-origin: *
2022-06-17T10:52:11Z [info]access-control-allow-methods: GET, POST, OPTIONS
2022-06-17T10:52:11Z [info]access-control-expose-headers: Content-Length,Content-Type,Date,Server,Connection
2022-06-17T10:52:11Z [info]%{description: "Webhook is already deleted", ok: true, result: true}
2022-06-17T10:52:11Z [info]warning: variable "ans" is unused (if the variable is not meant to be used, prefix it with an underscore)
2022-06-17T10:52:11Z [info] .iex.exs:18: Testing.match_q_text/3
2022-06-17T10:52:11Z [info]warning: variable "msgid" is unused (if the variable is not meant to be used, prefix it with an underscore)
2022-06-17T10:52:11Z [info] .iex.exs:18: Testing.match_q_text/3
2022-06-17T10:52:12Z [info]Main child exited normally with code: 0
2022-06-17T10:52:12Z [info]Reaped child process with pid: 557 and signal: SIGUSR1, core dumped? false
2022-06-17T10:52:12Z [info]Starting clean up.
--> v0 failed - Failed due to unhealthy allocations - no stable job version to auto revert to and deploying as v1

--> Troubleshooting guide at https://fly.io/docs/getting-started/troubleshooting/
Error abort

```

the app crashed after starting.

---

<div class="post-metadata">

**Author:** ![zee](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/zee/32/2570_2.png) [@zee](https://community.fly.io/u/zee)\
**Post date:** [June 17, 2022, 2:59pm UTC](https://community.fly.io/t/question-about-weird-deployment-size-on-fly/5677/3 "2022-06-17T14:59:21Z")

</div>

Hey there! I’m sorry you’re running into some issues here, first off, that difference in size between what you’re seeing locally and in the logs is normal when using a buildpack. The buildpacks contain a lot of stuff that may not always be necessary for a lot of apps, but is useful to make just about _any_ app work!

Secondly, can you try running `LOG_LEVEL=debug fly deploy` and share the output from that? That will just give us some more detailed logs so we an get more information on what’s going on here.

---

<div class="post-metadata">

**Author:** ![abeeshake](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/abeeshake/32/11492_2.png) [@abeeshake](https://community.fly.io/u/abeeshake)\
**Post date:** [June 18, 2022, 3:37am UTC](https://community.fly.io/t/question-about-weird-deployment-size-on-fly/5677/5 "2022-06-18T03:37:15Z")

</div>

output of `LOG_LEVEL=debug fly deploy `

[https://pastebin.com/Vf6554qT](https://pastebin.com/Vf6554qT)

---

<div class="post-metadata">

**Author:** ![abeeshake](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/abeeshake/32/11492_2.png) [@abeeshake](https://community.fly.io/u/abeeshake)\
**Post date:** [June 19, 2022, 3:06am UTC](https://community.fly.io/t/question-about-weird-deployment-size-on-fly/5677/6 "2022-06-19T03:06:56Z")

</div>

Hey @zee , did you get a chance to look at the logs?

---

<div class="post-metadata">

**Author:** ![zee](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/zee/32/2570_2.png) [@zee](https://community.fly.io/u/zee)\
**Post date:** [June 21, 2022, 12:30am UTC](https://community.fly.io/t/question-about-weird-deployment-size-on-fly/5677/7 "2022-06-21T00:30:39Z")

</div>

Hey, yes I did! Sorry for the delayed response. It looks like your app is is exiting with status code 0, usually this means it failed healthchecks (or didn’t pass them in time) I would recommend checking your `grace_period` in the healthcheck config.

---

<div class="post-metadata">

**Author:** ![abeeshake](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/abeeshake/32/11492_2.png) [@abeeshake](https://community.fly.io/u/abeeshake)\
**Post date:** [June 21, 2022, 12:44pm UTC](https://community.fly.io/t/question-about-weird-deployment-size-on-fly/5677/8 "2022-06-21T12:44:02Z")

</div>

I did increase grace period to “25s” , “git commit” fly.toml file and ran `fly deploy`

it got infinitely stuck at following step.

```auto
➜ fly deploy
==> Verifying app config
--> Verified app config
==> Building image
Remote builder fly-builder-falling-frost-8749 ready
==> Building image with Buildpacks
--> docker host: 20.10.12 linux x86_64
20: Pulling from heroku/buildpacks
Digest: sha256:0be6cf00687e3cca95da2cc1afe42bba5fc60453057b3b6c2c4cd6b72b7d2449
Status: Image is up to date for heroku/buildpacks:20
20-cnb: Pulling from heroku/heroku
Digest: sha256:5cfc72ccdb10b0c0e877f1baa5d336042a134a1f50ff2aec11a8644c464e5113
Status: Image is up to date for heroku/heroku:20-cnb
Downloading from https://cnb-shim.herokuapp.com/v1/hashnuke/elixir
1.81 MB/-1 B

```

````auto
Error failed to fetch an image or build from source: executing lifecycle: io: read/write on closed pipe

```
````

---

<div class="post-metadata">

**Author:** ![abeeshake](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/abeeshake/32/11492_2.png) [@abeeshake](https://community.fly.io/u/abeeshake)\
**Post date:** [June 21, 2022, 5:32pm UTC](https://community.fly.io/t/question-about-weird-deployment-size-on-fly/5677/9 "2022-06-21T17:32:46Z")

</div>

I am finally using Dockerfile - it is quick! (Kudos to fly)  
and small size .

Finally, I don’t have to rely on buildpacks.  
Thanks for your time. 🙂
