"The job exceeded the maximum log length" OR "No output has been received in the last 10m0s"

Hi. I run build code with language: nix and have two cases.

1st case:

.travis.yml

language: nix
nix: 2.3.6
script: nix-build -A dockerImage --no-out-link 

job terminated with error

The job exceeded the maximum log length, and has been terminated.

2nd case:

Ok, I understand that log size limits have reached. I have redirected all output mesages >/dev/null

.travis.yml

language: nix
nix: 2.3.6
script: nix-build -A dockerImage --no-out-link &>/dev/null
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received

I expect to travis_wait will work more then 10 min

$ travis_wait 60 nix-build -A dockerImage --no-out-link &>/dev/null

But I get an error again

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
The build has been terminated

How can I solve this issue?

did you find any solution i have this problem “cp: cannot create regular file ‘/etc/apt/trusted.gpg.d/apt.llvm.org.asc~’: Permission denied” and No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

249Check the details on how to adjust your build configuration on: Common Build Problems - Travis CI