From 9eb770a028bc63396eb33b97e3ee3c692723701b Mon Sep 17 00:00:00 2001 From: Sefa Degirmenci <56880835+zaqim@users.noreply.github.com> Date: Wed, 3 Aug 2022 17:14:32 +0200 Subject: [PATCH] Remove a broken link in Readme.md (#332) * Remove a broken link in Readme.md The link for open file limit was dead. The solution is elaborated in a short, compact way. * Reformat code * Fix formatting * Move noqa note to propagate * Fix formatting in streams.py Co-authored-by: William Barnhart --- README.md | 11 +++++++++-- faust/streams.py | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e0c7b4dfa..882c9aca8 100644 --- a/README.md +++ b/README.md @@ -407,8 +407,15 @@ introduced in Python 3.6 (`async`, `await`, variable type annotations). ### I get a maximum number of open files exceeded error by RocksDB when running a Faust app locally. How can I fix this -You may need to increase the limit for the maximum number of open files. The -following post explains how to do so on OS X: https://blog.dekstroza.io/ulimit-shenanigans-on-osx-el-capitan/ +You may need to increase the limit for the maximum number of open files. +On macOS and Linux you can use: + +```ulimit -n max_open_files``` to increase the open files limit to max_open_files. + +On docker, you can use the --ulimit flag: + +```docker run --ulimit nofile=50000:100000 ``` +where 50000 is the soft limit, and 100000 is the hard limit [See the difference](https://unix.stackexchange.com/a/29579). ### What kafka versions faust supports diff --git a/faust/streams.py b/faust/streams.py index 2e45b6ace..a50f9d979 100644 --- a/faust/streams.py +++ b/faust/streams.py @@ -394,8 +394,8 @@ async def add_to_buffer(value: T) -> T: async def take_with_timestamp( self, max_: int, within: Seconds, timestamp_field_name: str ) -> AsyncIterable[Sequence[T_co]]: - """Buffer n values at a time and yield a list of buffered values with the timestamp - when the message was added to kafka. + """Buffer n values at a time and yield a list of buffered values with the + timestamp when the message was added to kafka. Arguments: max_: Max number of messages to receive. When more than this