when clients connection increase will throw error: can't convert nil into an exact number

Open
#1,054 26 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
ruby
Domain
api, backend

Research direction

No source file, test, stack trace, or expected fix is named. Start by reproducing the two ApacheBench commands against the reported Thin setup and capture the full error; trace the nil-to-number conversion to its source. Done means the higher-concurrency request no longer raises this error, with a regression test if the failure can be isolated.

Written by the indexing model from the issue text.

Description

bug?

I use ab to test:

1 concurrency works fine

ab -c 1 -n 100 http://server/api/v1/products.json

10 concurrency works will error

ab -c 10 -n 100 http://server/api/v1/products.json

my server is 4GB memory, I use thin as server, 3 thin process, 1024 connection for per thin process. database pool set to 3 * 1024 = 3072

Dominant language
Ruby
Stars
10k
Forks
1.2k
Avg merge
14h 38m
Merged PRs (30d)
92

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ruby-grape/grape

All issues in ruby-grape/grape

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.