Skip to content

Commit c38d61c

Browse files
authored
CONTRIBUTING: file limits
[ci skip]
1 parent aa732fd commit c38d61c

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

CONTRIBUTING.md

+24-1
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@ Newbies welcome! We would be happy to help you make your first contribution to a
2727

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

30+
31+
#### Clone the repo
32+
3033
Clone the Puma repository:
3134
```sh
3235
git clone [email protected]:puma/puma.git && cd puma
3336
```
3437

38+
#### Ragel
39+
3540
You need to install [ragel] (use Ragel version 7.0.0.9) to generate Puma's extension code.
3641

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

58+
#### Install Ruby depedencies
59+
5360
Install the Ruby dependencies:
5461
```sh
5562
bundle install
5663
```
5764

58-
To run Puma locally, you must compile the native extension.
65+
#### Compile the native extensions
66+
67+
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:
5968

6069
Ubuntu, macOS, etc:
6170
```sh
@@ -67,6 +76,8 @@ Windows:
6776
bundle exec rake -rdevkit compile
6877
```
6978

79+
#### Run your local Puma
80+
7081
Now, you should be able to run Puma locally:
7182

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

126+
#### File limits
127+
128+
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.
129+
130+
Check your file limit:
131+
132+
```
133+
ulimit -Sn
134+
```
135+
136+
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/)
137+
115138
## How to contribute
116139

117140
Puma could use your help in several areas!

0 commit comments

Comments
 (0)