# Experiencing Slow Build

**URL:** <https://forums.balena.io/t/experiencing-slow-build/5278>\
**Category:** Product support\
**Created:** [February 11, 2019, 7:54pm UTC](https://forums.balena.io/t/experiencing-slow-build/5278 "2019-02-11T19:54:31Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![wwalker](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/wwalker/32/1225_2.png) [@wwalker](https://forums.balena.io/u/wwalker)\
**Post date:** [February 11, 2019, 7:54pm UTC](https://forums.balena.io/t/experiencing-slow-build/5278/1 "2019-02-11T19:54:31Z")

</div>

‘[electron] Step 4/7 : COPY ./app ./  
[electron] —\> ff173bf084a3  
[electron] Removing intermediate container a9bbecabd9b3  
[electron] Step 5/7 : RUN npm install  
[electron] —\> Running in 7be492a7a144  
[Info] Still working…  
[Info] Still working…  
[Info] Still working…  
[Info] Still working…  
[Info] Still working…’

Experiencing slow builds for arm devices

---

<div class="post-metadata">

**Author:** ![majorz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/majorz/32/639_2.png) [@majorz](https://forums.balena.io/u/majorz)\
**Post date:** [February 12, 2019, 9:02am UTC](https://forums.balena.io/t/experiencing-slow-build/5278/4 "2019-02-12T09:02:22Z")

</div>

HI, can you please provide the full build log please? Also is this still an issue on your side?

---

<div class="post-metadata">

**Author:** ![pdcastro](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/pdcastro/32/1264_2.png) [@pdcastro](https://forums.balena.io/u/pdcastro)\
**Post date:** [February 12, 2019, 5:39pm UTC](https://forums.balena.io/t/experiencing-slow-build/5278/5 "2019-02-12T17:39:47Z")

</div>

Just to add:

- Occasionally, if a native ARM server is unavailable due to load or maintenance, an x86 builder is used with QEMU emulation and this can result in a slower build. (We have a pool of native ARM servers that normally meet the demand for them.)
- If you suspect that the native ARM servers are getting in the way rather than speeding up your builds, you can force a QEMU emulated build on x86 servers with the commands:
  - `git push balena master:balena-emulated`
  - `balena push ... --emulated`
  - `balena build ... --emulated`
  - `balena deploy ... --emulated`

- Prefixing balena commands with `DEBUG=1` adds debugging messages to the output logs:  
`DEBUG=1 balena push ...`

---

<div class="post-metadata">

**Author:** ![daghemo](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/daghemo/32/531_2.png) [@daghemo](https://forums.balena.io/u/daghemo)\
**Post date:** [February 12, 2019, 6:15pm UTC](https://forums.balena.io/t/experiencing-slow-build/5278/6 "2019-02-12T18:15:31Z")

</div>

Me too, but only on arm01. That is, builds are running fine on arm03.

---

<div class="post-metadata">

**Author:** ![daghemo](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/daghemo/32/531_2.png) [@daghemo](https://forums.balena.io/u/daghemo)\
**Post date:** [February 12, 2019, 7:34pm UTC](https://forums.balena.io/t/experiencing-slow-build/5278/7 "2019-02-12T19:34:47Z")

</div>

This is what I’m getting right now:

```
[Info] Starting build for tlprototyping, user danilo_aghemo
[Info] Dashboard link: https://dashboard.balena-cloud.com/apps/1109673/devices
[Info] Building on arm01
[Info] Pulling previous images for caching purposes...
[Success] Successfully pulled cache images
[Info] Still working..

```

Is it safe (for you) to just CTRL-C, so that maybe next time I will end up on a different system?

---

<div class="post-metadata">

**Author:** ![thundron](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thundron/32/1379_2.png) [@thundron](https://forums.balena.io/u/thundron)\
**Post date:** [February 12, 2019, 8:35pm UTC](https://forums.balena.io/t/experiencing-slow-build/5278/8 "2019-02-12T20:35:40Z")

</div>

Yes it will interrupt the build and it is safe, but we currently have a known issue that we’re working on (and it’s not trivial unfortunately) where the first commit after an interrupted build could fail. If that happens, don’t worry and just push the commit again because it shouldn’t be stored on our side

---

<div class="post-metadata">

**Author:** ![pdcastro](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/pdcastro/32/1264_2.png) [@pdcastro](https://forums.balena.io/u/pdcastro)\
**Post date:** [February 12, 2019, 9:10pm UTC](https://forums.balena.io/t/experiencing-slow-build/5278/9 "2019-02-12T21:10:43Z")

</div>

Thanks for reporting this @daghemo. We had observed intermittent native ARM builder issues that eventually escalated to an incident, now resolved: [https://status.balena.io/incidents/yfyfmc0dxw52](https://status.balena.io/incidents/yfyfmc0dxw52)

@wwalker, @daghemo, I wanted to also share an alternative to the ARM cloud builders or to emulators, which is to build on a local ARM device like a Raspberry Pi 3B (running a recent version of balenaOS). [Enable local mode](https://www.balena.io/docs/learn/develop/local-mode/) on the device, then run the commands below on a terminal on your laptop/desktop, replacing ‘192.168.2.3’ with your local device’s IP address:

```auto
# build the docker image on the device at the given IP address
balena build -a my_app -h 192.168.2.3 -p 2375 .
# copy the docker image from the device to the laptop/desktop
ssh root@192.168.2.3 -p 22222 balena-engine save my_image | docker load
# upload the image to the balena cloud for deployment to devices
balena deploy my_app my_image

```

The documentation for the build and deploy commands can be read with `balena help build` and `balena help deploy`, or on this page: [https://www.balena.io/docs/reference/cli/#build-source-](https://www.balena.io/docs/reference/cli/#build-source-)

The ssh command line above copies the image to the laptop’s / deskotp’s local docker daemon, which therefore must be installed and running. The images can be listed with the `docker ps` command. The counterpart command to copy an image in the opposite direction (from the laptop/desktop to a balena device) is:

```auto
docker save my_image | ssh root@192.168.2.3 -p 22222 balena-engine load

```

---

<div class="post-metadata">

**Author:** ![daghemo](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/daghemo/32/531_2.png) [@daghemo](https://forums.balena.io/u/daghemo)\
**Post date:** [February 12, 2019, 10:26pm UTC](https://forums.balena.io/t/experiencing-slow-build/5278/10 "2019-02-12T22:26:09Z")

</div>

@pdcastro, I’m going to try the suggested setup in the next few days.  
Maybe arm01 is still having some problems:

```
[main] E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-armhf/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device)
[main] E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-armhf/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device)
[main] E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-armhf/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device)
[main] E: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/main/binary-armhf/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device) [IP: 93.93.128.230 80]
[main] E: Failed to fetch http://archive.raspbian.org/raspbian/dists/stretch/contrib/binary-armhf/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device)
[main] E: Some index files failed to download. They have been ignored, or old ones used instead.
```

---

<div class="post-metadata">

**Author:** ![pdcastro](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/pdcastro/32/1264_2.png) [@pdcastro](https://forums.balena.io/u/pdcastro)\
**Post date:** [February 12, 2019, 11:21pm UTC](https://forums.balena.io/t/experiencing-slow-build/5278/12 "2019-02-12T23:21:00Z")

</div>

@daghemo, we haven’t been able to reproduce the `No space left on device` errors, so I think it was a temporary issue. I have updated one of my posts above to list `git` and `balena` commands to force an emulated cloud build on x86 servers instead of using the native ARM servers, if you find that they are getting in the way rather than speeding up the build:

> [@Experiencing Slow Build](https://forums.balena.io/t/experiencing-slow-build/5278/5):
>
> Just to add: Occasionally, if a native ARM server is unavailable due to load or maintenance, an x86 builder is used with QEMU emulation and this can result in a slower build. (We have a pool of native ARM servers that normally meet the demand for them.) If you suspect that the native ARM servers are getting in the way rather than speeding up your builds, you can force a QEMU emulated build on x86 servers with the commands: git push balena master:balena-emulated balena push ... --emulated bale…

---

<div class="post-metadata">

**Author:** ![brdrcol](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/brdrcol/32/1116_2.png) [@brdrcol](https://forums.balena.io/u/brdrcol)\
**Post date:** [February 13, 2019, 4:09am UTC](https://forums.balena.io/t/experiencing-slow-build/5278/13 "2019-02-13T04:09:27Z")

</div>

@pdcastro, our applications have also been getting the `No space left on device` errors on arm01 today, 4 hours or so after your reply

Thanks those commands though, I’m running a balena-emulated branch build now. We were previously using the balena-nocache remote branch but things seem to be building OK so far.

---

<div class="post-metadata">

**Author:** ![daghemo](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/daghemo/32/531_2.png) [@daghemo](https://forums.balena.io/u/daghemo)\
**Post date:** [February 13, 2019, 7:24am UTC](https://forums.balena.io/t/experiencing-slow-build/5278/14 "2019-02-13T07:24:58Z")

</div>

Thanks @pdcastro!  
Now I’m having a new error from arm01:

```
[main] Step 25/71 : ENV UDEV on
[main] Using cache
[main] ---> 9cf325d34ba8
[main] Step 26/71 : ENV INITSYSTEM on
[main] Using cache
[main] ---> d434e5ff1fbd
[main] Step 27/71 : ENV container docker
[main] unable to find image "sha256:1937a5dd9d24b82834ac1a3143369a0247bcd4f6b3c82159ee3783e77e7f4468"
[Info] Uploading images
[Success] Successfully uploaded images
[
```

---

<div class="post-metadata">

**Author:** ![cyplo](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/cyplo/32/1224_2.png) [@cyplo](https://forums.balena.io/u/cyplo)\
**Post date:** [February 13, 2019, 10:09am UTC](https://forums.balena.io/t/experiencing-slow-build/5278/15 "2019-02-13T10:09:27Z")

</div>

For the `no space left` error - there was an issue with one of our ARM builders - see [https://status.balena.io/incidents/hjhvb0cf8pm7](https://status.balena.io/incidents/hjhvb0cf8pm7) and [https://status.balena.io/incidents/yfyfmc0dxw52](https://status.balena.io/incidents/yfyfmc0dxw52) - this should be resolved now.

---

<div class="post-metadata">

**Author:** ![pdcastro](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/pdcastro/32/1264_2.png) [@pdcastro](https://forums.balena.io/u/pdcastro)\
**Post date:** [February 13, 2019, 2:40pm UTC](https://forums.balena.io/t/experiencing-slow-build/5278/16 "2019-02-13T14:40:59Z")

</div>

@daghemo, if you’re still seeing the _‘unable to find image’_ error, try bypassing the builder cache:

- `git push balena master:balena-nocache`
- `balena push ... --nocache`
- `balena build ... --nocache`
- `balena deploy ... --nocache`

---

<div class="post-metadata">

**Author:** ![wwalker](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/wwalker/32/1225_2.png) [@wwalker](https://forums.balena.io/u/wwalker)\
**Post date:** [February 14, 2019, 12:27am UTC](https://forums.balena.io/t/experiencing-slow-build/5278/17 "2019-02-14T00:27:39Z")

</div>

No longer experiencing issues.

---

<div class="post-metadata">

**Author:** ![yyogeshwar](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/yyogeshwar/32/2369_2.png) [@yyogeshwar](https://forums.balena.io/u/yyogeshwar)\
**Post date:** [April 13, 2020, 6:30pm UTC](https://forums.balena.io/t/experiencing-slow-build/5278/18 "2020-04-13T18:30:03Z")

</div>

Today i am also facing similar issue

Device - jetson nano ,

Tried 3-4 times building but same issue for around 30-40 minutes.

OS is production so can not use local mode.

 ![Screenshot 2020-04-13 at 11.56.19 PM](https://global.discourse-cdn.com/balena/original/2X/c/c023ff4bfc23310f2c5145227def10b0598a5fd9.png)

---

<div class="post-metadata">

**Author:** ![anujdeshpande](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/anujdeshpande/32/3155_2.png) [@anujdeshpande](https://forums.balena.io/u/anujdeshpande)\
**Post date:** [April 14, 2020, 8:20am UTC](https://forums.balena.io/t/experiencing-slow-build/5278/19 "2020-04-14T08:20:23Z")

</div>

Hi  
I can confirm that at the moment we aren’t having any issues on our builders ([https://status.balena.io/](https://status.balena.io/))  
Are you still facing issues? Do you have complete logs of when you were trying to deploy?
