Skip to content

Commit

Permalink
CONTRIBUTING: file limits
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
nateberkopec committed Jan 24, 2022
1 parent aa732fd commit c38d61c
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion CONTRIBUTING.md
Expand Up @@ -27,11 +27,16 @@ Newbies welcome! We would be happy to help you make your first contribution to a

First step: join us on Matrix at [#puma-contrib:matrix.org](https://matrix.to/#/!blREBEDhVeXTYdjTVT:matrix.org?via=matrix.org)


#### Clone the repo

Clone the Puma repository:
```sh
git clone git@github.com:puma/puma.git && cd puma
```

#### Ragel

You need to install [ragel] (use Ragel version 7.0.0.9) to generate Puma's extension code.

macOS:
Expand All @@ -50,12 +55,16 @@ Windows (Ruby 2.5 and later):
ridk exec pacman -S mingw-w64-x86_64-openssl mingw-w64-x86_64-ragel
```

#### Install Ruby depedencies

Install the Ruby dependencies:
```sh
bundle install
```

To run Puma locally, you must compile the native extension.
#### Compile the native extensions

To run Puma locally, you must compile the native extension. Running the `test` rake task does this automatically, but you may need to manually run the compile command if you want to run Puma and haven't run the tests yet:

Ubuntu, macOS, etc:
```sh
Expand All @@ -67,6 +76,8 @@ Windows:
bundle exec rake -rdevkit compile
```

#### Run your local Puma

Now, you should be able to run Puma locally:

```sh
Expand Down Expand Up @@ -112,6 +123,18 @@ To run a single test with 5 seconds as the test case timeout:
TEST_CASE_TIMEOUT=5 bundle exec m test/test_binder.rb:37
```

#### File limits

Puma's test suite opens up a lot of sockets. This may exceed the default limit of your operating system. If your file limits are low, you may experience "too many open file" errors when running the Puma test suite.

Check your file limit:

```
ulimit -Sn
```

We find that values of 4000 or more work well. [Learn more about your file limits and how to change them here.](https://wilsonmar.github.io/maximum-limits/)

## How to contribute

Puma could use your help in several areas!
Expand Down

0 comments on commit c38d61c

Please sign in to comment.