Commit 8071686
Fixes #39229 - Add foreman_request_timeout setting to control Net::HTTP read timeout
ForemanRequest uses a bare Net::HTTP instance whose read_timeout defaults to
Ruby's hardcoded 60s. Under high-concurrency registration load this causes
500 errors when Foreman takes longer than 60s to process POST /register.
Introduces :foreman_request_timeout (documented in settings.yml.example) and
applies it to http.read_timeout in ForemanRequest#http_init when configured.
The respond_to? guard preserves backward compatibility when the setting is absent.
subscription-manager's default server_timeout is 180s, so values above that
are recommended to avoid cutting connections the client is still waiting on.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>1 parent a5780bc commit 8071686
3 files changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
57 | 69 | | |
58 | 70 | | |
59 | 71 | | |
| |||
0 commit comments