# No space left on device after xenial update

**URL:** <https://travis-ci.community/t/no-space-left-on-device-after-xenial-update/5268>\
**Category:** Xenial\
**Tags:** build-env, python\
**Created:** [October 1, 2019, 1:50am UTC](https://travis-ci.community/t/no-space-left-on-device-after-xenial-update/5268 "2019-10-01T01:50:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamareebjamal](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/iamareebjamal/32/2807_2.png) [@iamareebjamal](https://travis-ci.community/u/iamareebjamal)\
**Post date:** [October 1, 2019, 1:50am UTC](https://travis-ci.community/t/no-space-left-on-device-after-xenial-update/5268/1 "2019-10-01T01:50:06Z")

</div>

After updating the dist to xenial, the builds are randomly and consistently failing with error: ‘No space left on device’

We have 254 MB of dependencies and we are testing using PostgreSQL database which we clear before each test, so it is unlinkely that our tests are causing the disk to fill up.

These are the failing builds, there are more of these in the project:

[https://travis-ci.org/fossasia/open-event-server/builds/591743394?utm\_source=github\_status&utm\_medium=notification](https://travis-ci.org/fossasia/open-event-server/builds/591743394?utm_source=github_status&utm_medium=notification)  
[https://travis-ci.org/fossasia/open-event-server/builds/591743551?utm\_source=github\_status&utm\_medium=notification](https://travis-ci.org/fossasia/open-event-server/builds/591743551?utm_source=github_status&utm_medium=notification)

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [October 1, 2019, 1:55am UTC](https://travis-ci.community/t/no-space-left-on-device-after-xenial-update/5268/2 "2019-10-01T01:55:01Z")

</div>

Use [`df -h`](http://man7.org/linux/man-pages/man1/df.1.html) and [`du -shx`](http://man7.org/linux/man-pages/man1/du.1.html) to check space on device and occupied by individual subtrees.  
This will help you localize at what stages and to what places the space goes.

---

<div class="post-metadata">

**Author:** ![iamareebjamal](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/iamareebjamal/32/2807_2.png) [@iamareebjamal](https://travis-ci.community/u/iamareebjamal)\
**Post date:** [October 1, 2019, 2:38am UTC](https://travis-ci.community/t/no-space-left-on-device-after-xenial-update/5268/3 "2019-10-01T02:38:40Z")

</div>

We know the failing command, everything is localized. There’s only one stage - dredd tests where the space goes. It’s not a question of what we can do to prevent it or debug what wrong is happening. We already know that.

Also, as this is only happening in xenial distriution, and not if we to back to trusty. So, I don’t think this is something we control.

Our tests write the bare minimum data to the PostgreSQL database between each tests, so it can’t be reduced.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [October 1, 2019, 2:55am UTC](https://travis-ci.community/t/no-space-left-on-device-after-xenial-update/5268/4 "2019-10-01T02:55:09Z")

</div>

> [@iamareebjamal](#):
>
> We know the failing command, everything is localized. There’s only one stage - dredd tests where the space goes.

Since you still don’t know what exact operations eat up the space and where – that’s not enough localization.  
Localize it further – e.g. run those commands after each test, at specific points inside complicit tests if needed.

> So, I don’t think this is something we control.

Without localization, neither do Travis know if that’s something that they control.

---

<div class="post-metadata">

**Author:** ![iamareebjamal](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/iamareebjamal/32/2807_2.png) [@iamareebjamal](https://travis-ci.community/u/iamareebjamal)\
**Post date:** [October 1, 2019, 3:12am UTC](https://travis-ci.community/t/no-space-left-on-device-after-xenial-update/5268/5 "2019-10-01T03:12:13Z")

</div>

I don’t know if you have even seen the builds I have linked.

As I have told that this does not happen on trusty distribution, only on xenial. And all the operations are DB based, I don’t have anything else to say. The project is open source, the build logs have been provided. It is definitely something the xenial image of Travis controls as it does not happen on trusty and also, sometimes does not happen on xenial

Our tests are not flaky. I am not sure what more you want to localize?

The build shows this error - `sqlalchemy.exc.OperationalError: (psycopg2.errors.DiskFull) could not write to file "pg_xlog/xlogtemp.8485": No space left on device`

What more localization you want?

```auto
fail: GET (200) /v1/tasks/1 duration: 11011ms

3728info: Hooks handler stderr: Traceback (most recent call last):

3729 File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 761, in _commit_impl

3730 self.engine.dialect.do_commit(self.connection)

3731 File "/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 505, in do_commit

3732 dbapi_connection.commit()

3733psycopg2.errors.DiskFull: could not write to file "pg_xlog/xlogtemp.8018": No space left on device

```

---

<div class="post-metadata">

**Author:** ![iamareebjamal](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/iamareebjamal/32/2807_2.png) [@iamareebjamal](https://travis-ci.community/u/iamareebjamal)\
**Post date:** [October 1, 2019, 3:14am UTC](https://travis-ci.community/t/no-space-left-on-device-after-xenial-update/5268/6 "2019-10-01T03:14:57Z")

</div>

How will more localization help? What will it accomplish?

This build, same code, does not fail - [https://travis-ci.org/fossasia/open-event-server/builds/591743128?utm\_source=github\_status&utm\_medium=notification](https://travis-ci.org/fossasia/open-event-server/builds/591743128?utm_source=github_status&utm_medium=notification)

How can that not be controlled by Travis?

---

<div class="post-metadata">

**Author:** ![iamareebjamal](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/iamareebjamal/32/2807_2.png) [@iamareebjamal](https://travis-ci.community/u/iamareebjamal)\
**Post date:** [October 1, 2019, 4:02am UTC](https://travis-ci.community/t/no-space-left-on-device-after-xenial-update/5268/7 "2019-10-01T04:02:16Z")

</div>

Similar issues have been reported in past by several people, [https://github.com/travis-ci/travis-ci/issues/8375](https://github.com/travis-ci/travis-ci/issues/8375)

I still ran `df` before each test and at the starting of the build.

Here are the results:

Before the start of test:

```auto
Filesystem Size Used Avail Use% Mounted on
udev 3.7G 0 3.7G 0% /dev
tmpfs 748M 8.6M 739M 2% /run
/dev/sda1 68G 12G 57G 18% /
tmpfs 3.7G 8.0K 3.7G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.7G 0 3.7G 0% /sys/fs/cgroup
none 768M 51M 718M 7% /var/ramfs
tmpfs 748M 0 748M 0% /run/user/2000

```

Last output after tests:

```auto
Filesystem Size Used Avail Use% Mounted on
udev 3.7G 0 3.7G 0% /dev
tmpfs 748M 8.7M 739M 2% /run
/dev/sda1 68G 12G 57G 18% /
tmpfs 3.7G 8.0K 3.7G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.7G 0 3.7G 0% /sys/fs/cgroup
none 768M 713M 56M 93% /var/ramfs
tmpfs 748M 0 748M 0% /run/user/2000

```

This time the build did not fail

---

<div class="post-metadata">

**Author:** ![jagdishdasani](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jagdishdasani/32/7147_2.png) [@jagdishdasani](https://travis-ci.community/u/jagdishdasani)\
**Post date:** [September 15, 2021, 7:37pm UTC](https://travis-ci.community/t/no-space-left-on-device-after-xenial-update/5268/8 "2021-09-15T19:37:41Z")

</div>

Hi @iamareebjamal @native-api  
We found the solution for this by increasing space for `/var/ramfs`

> **[Travis CI Documentation](https://docs.travis-ci.com/user/trusty-to-xenial-migration-guide#1-services-support)**
>
> Ubuntu Trusty to Ubuntu Xenial Migration Guide
