# Build log truncated

**URL:** <https://travis-ci.community/t/build-log-truncated/10395>\
**Category:** Travis CI Discussions & Feedback\
**Tags:** bug\
**Created:** [October 31, 2020, 6:54pm UTC](https://travis-ci.community/t/build-log-truncated/10395 "2020-10-31T18:54:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![webzwo0i](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@webzwo0i](https://travis-ci.community/u/webzwo0i)\
**Post date:** [October 31, 2020, 6:54pm UTC](https://travis-ci.community/t/build-log-truncated/10395/1 "2020-10-31T18:54:03Z")

</div>

Hi, first of all thanks for the awesome service. We use Travis to run a lot of tests for [Etherpad](https://github.com/ether/etherpad-lite) and it really, really helps us developing.

In case I should not post this kind of questions/bug reports to the community forum it would be awesome if you could direct me to the proper issue tracker.

Unfortunately, we run into issues with truncated logs. No matter if the build is successful or not, sometimes the log in the Web-UI is truncated. Examples:  
[https://api.travis-ci.com/v3/job/423103630/log.txt](https://api.travis-ci.com/v3/job/423103630/log.txt)  
[https://api.travis-ci.com/v3/job/423289803/log.txt](https://api.travis-ci.com/v3/job/423289803/log.txt)  
[https://api.travis-ci.com/v3/job/423290805/log.txt](https://api.travis-ci.com/v3/job/423290805/log.txt)

When using the API with travis gem it also returns the truncated log. The point where the logs break differ. I have seen this behaviour in the past - I think it was always present, maybe in 1 of 10 builds. Sometimes the full log appeared after some minutes.  
However, we migrated from .org to .com lately and now the issue seem to be present nearly every time. Unfortunately I also started to use travis\_wait (our test runner can take more than 10 minutes) at around the same time, so this also might be the reason.

I tried different things (redirecting output to a file and cat them, adding sleep after the command that produces the output, pv -q -L 1K to reduce the number of bytes that are transferred to the logs, after\_script hook with a sleep statement) without success.

An explanation for this might be at [https://github.com/travis-ci/travis-ci/issues/6018#issuecomment-370023238](https://github.com/travis-ci/travis-ci/issues/6018#issuecomment-370023238) We indeed use secret environment variables (we need them for saucelabs).  
Because debug mode is disabled (it’s a public repo) I cannot tell for sure, if we are using the redirect\_io strategy or pty.

Is there a workaround you know of or a way for us to activate pty strategy?

Thanks in advance!

---

<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 31, 2020, 7:04pm UTC](https://travis-ci.community/t/build-log-truncated/10395/2 "2020-10-31T19:04:16Z")

</div>

> [@Error processing tar file(exit status 1): operation not permitted](https://travis-ci.community/t/error-processing-tar-file-exit-status-1-operation-not-permitted/5696/6):
>
> IIRC this happens if you produce very much output very quickly and Travis logging system (which includes a network transfer) gets overwhelmed. Don’t output the contents of the .tar file and you should be okay.

---

<div class="post-metadata">

**Author:** ![webzwo0i](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@webzwo0i](https://travis-ci.community/u/webzwo0i)\
**Post date:** [October 31, 2020, 8:07pm UTC](https://travis-ci.community/t/build-log-truncated/10395/3 "2020-10-31T20:07:19Z")

</div>

It was my intention to slow down the output with “pv -q -L 1K” but it had no effect.

---

<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 31, 2020, 9:02pm UTC](https://travis-ci.community/t/build-log-truncated/10395/4 "2020-10-31T21:02:23Z")

</div>

Could you elaborate? `pv` worked for me: [https://travis-ci.com/github/native-api/test\_travis/builds/196966381](https://travis-ci.com/github/native-api/test_travis/builds/196966381)  
I only needed to install it since it’s not preinstalled.
