Skip to content
This repository was archived by the owner on Apr 21, 2020. It is now read-only.
This repository was archived by the owner on Apr 21, 2020. It is now read-only.

Buffer stdout and stderr to disk #1

Description

@duckinator

The Shelly library buffers stdout (and presumably stderr) to memory by default. If the buffer gets too large the OOMKiller will kill the entire thing.

Can be reproduced with the following Ruby code: loop { puts 1 }
Untested, but can presumably also be reproduced with: loop { warn 1 }

The easiest way to fix this would be to buffer to disk.

It would probably also be a good idea to set a fairly high buffer limit (a few megabytes, possibly?) to avoid excessive disk usage, but that can be pulled out into a separate issue if necessary.

The runHandles function may be useful in resolving this: https://hackage.haskell.org/package/shelly-1.6.1.2/docs/Shelly.html#g:3

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions