CARVIEW |
Select Language
HTTP/2 200
date: Sun, 24 Aug 2025 05:22:28 GMT
content-type: text/html; charset=utf-8
cache-control: max-age=0, private, must-revalidate
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
link: ; rel=preload; as=fetch; crossorigin=use-credentials
referrer-policy: no-referrer-when-downgrade
server-timing: issue_layout-fragment;desc="issue_layout fragment";dur=220.748773,issue_conversation_content-fragment;desc="issue_conversation_content fragment";dur=816.900139,nginx;desc="NGINX";dur=0.802533,glb;desc="GLB";dur=96.821433
strict-transport-security: max-age=31536000; includeSubdomains; preload
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With, Accept,Accept-Encoding, Accept, X-Requested-With
x-content-type-options: nosniff
x-frame-options: deny
x-voltron-version: 2477dc8
x-xss-protection: 0
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=EwaD6bUdnxrlZyjQRdxp77U64LMIzvaVQHT8ESG9OpzpvAlIr1lOUbkjIwuhV%2FLlpfobSTTEeJDNKGc4DlLXqscAZnLuZkUuwKChMwWj1EhWl4XCHzpI2CHLFz85jbXcPNrKvDUr3W3M%2Brl05RknBnrS7onfXxKZyTXby%2BMuFyy7cXhUmA5UV%2FwosftgIGGZRe2lAecKfUWgWgKrYIc%2B0R8%2BmcyFL9Ily%2FAbEGIR9V1lCd90MPjWmxVxC0QId5PhK3lI3rNgSXgC1YuZxJJH2w%3D%3D--ZAsowYggzkDrz7te--daEryIFkEDSDA5u5RDFWtw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1176287667.1756012947; Path=/; Domain=github.com; Expires=Mon, 24 Aug 2026 05:22:27 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 24 Aug 2026 05:22:27 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: CAA2:2633B2:B3CCF9:EF799A:68AAA193
Perf issue: High longtail response times with KeepAlive=true when running with(or without) workers Β· Issue #3487 Β· puma/puma Β· GitHub
and that could be an okay place to look. Also within
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Describe the bug
When using ab
with -k
or using hey
(a go based a/b network testing library) I see very high long tail response times that is an order of magnitude of what I would expect.
AB without keepalive:
$ ab -c 10 -n 200 127.0.0.1:3000/
...
Percentage of the requests served within a certain time (ms)
50% 420
66% 421
75% 422
80% 422
90% 423
95% 424
98% 426
99% 428
100% 432 (longest request)
Longest request took 432ms
With keepalive:
$ ab -c 10 -n 200 -k 127.0.0.1:3000/
...
Percentage of the requests served within a certain time (ms)
50% 205
66% 205
75% 206
80% 206
90% 1852
95% 2258
98% 2273
99% 2450
100% 2477 (longest request)
Longest request took 2,477ms (or 5.7x longer than without keepalive).
Puma config:
$ cat Gemfile
source "https://rubygems.org"
gem "puma"
gem "rack"
βοΈ 3.3.1 π /private/tmp/e3f9bf2d7f5e861b6de95d7e48a1b5b0
$ cat config.ru
require 'rack'
response = ['200', {'Content-Type' => 'text/html'}, ['Hello, World!']]
app = Proc.new do |env|
sleep 0.2
response
end
run app
$ bundle exec puma -t5 -p 3000
Puma starting in single mode...
* Puma version: 6.4.2 (ruby 3.3.1-p55) ("The Eagle of Durango")
* Min threads: 5
* Max threads: 5
* Environment: development
* PID: 7434
* Listening on https://0.0.0.0:3000
Use Ctrl-C to stop
To Reproduce
- Use the above example app that sleeps for 200ms
- Boot with
bundle exec puma -t5 -p 3000
- Hit with AB and keepalive enabled or
hey
$ hey -c 10 -n 200 https://localhost:3000/
Summary:
Total: 8.3877 secs
Slowest: 2.4628 secs
Fastest: 0.2005 secs
Average: 0.3612 secs
Requests/sec: 23.8445
Total data: 2600 bytes
Size/request: 13 bytes
Response time histogram:
0.201 [1] |
0.427 [184] |β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
0.653 [0] |
0.879 [0] |
1.105 [0] |
1.332 [0] |
1.558 [0] |
1.784 [0] |
2.010 [0] |
2.237 [0] |
2.463 [15] |β β β
Extra observations
- Enabling workers makes the problem go away
- Disabling keepalive makes the problem go away
In server.rb
the codepaths diverge
Lines 467 to 469 in 796d8c6
case handle_request(client, requests + 1) | |
when false | |
break |
prepare_response()
in lib/puma/request.rb
. The return value of true indicates keepalive and false indicates no keepalive.slizco, cromwellryan, edmorley, nijikon, amitsaxena and 2 morewyattades and ssunday
You canβt perform that action at this time.