Drone 0.5 logs are truncated at lines >~65535 bytes

Drone 0.5 logs are truncated at lines longer than roughly 65535 bytes (I couldn’t find a consistent cutoff). Consider the following .drone.yml, where “b” is output to the log but not “c”:

version: 2

pipeline:
  build:
    image: ubuntu
    commands:
    - echo "a"
    - bash -c "printf '.%.0s' {1..65500}; echo";
    - echo "b"
    - bash -c "printf '.%.0s' {1..65600}; echo";
    - echo "c"

In some similar cases the full log was displayed while following the build, but it was truncated when viewing the build afterwards.

Please confirm, and I will open a GitHub issue.

The maximum log output for drone is 5mb, and can be increased by setting the max log environment variable. See the following documentation for additional details:
http://readme.drone.io/admin/installation-reference/

There are also known issues and regressions in certain versions of Docker that impact streaming logs, such as https://github.com/docker/docker/issues/22502

There are currently no known issues with the Drone log implementation.

Thanks, seems likely it’s a Docker problem. I found this old issue, which they claim should have been fixed, but may have regressed since: https://github.com/docker/docker/issues/13333

I am facing a similar issue. @erikgrinaker Did you solve the problem.

I know this is an old thread but I have this problem now. I could see the log while building but after the building phase was over the log disappear. I am using drone server 0.8.5. Is the DRONE_MAX_LOGS settings still valid for drone server 0.8.5? Thanks!

I did not found DRONE_MAX_LOGS in 0.8.5

Unfortunately Drone 0.5 is deprecated and is no longer supported. The log size has been increased in newer versions of Drone.