Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions core/cmd/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,15 @@ type AppFactory interface {
type ChainlinkAppFactory struct{}

// NewApplication returns a new instance of the node with the given config.
func pipelineHTTPTransportConfig(cfg chainlink.GeneralConfig) clhttp.TransportConfig {
jp := cfg.JobPipeline()
return clhttp.TransportConfig{
MaxIdleConns: jp.HTTPTransportMaxIdleConns(),
MaxIdleConnsPerHost: jp.HTTPTransportMaxIdleConnsPerHost(),
IdleConnTimeout: jp.HTTPTransportIdleConnTimeout(),
}
}

func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.GeneralConfig, appLggr logger.Logger, appRegisterer prometheus.Registerer, ds sqlutil.DataSource, keyStore keystore.Master) (app chainlink.Application, err error) {
err = migrate.SetMigrationENVVars(cfg.EVMConfigs())
if err != nil {
Expand All @@ -235,7 +244,7 @@ func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.G
LatestReportDeadline: cfg.Mercury().Cache().LatestReportDeadline(),
})

unrestrictedClient := clhttp.NewUnrestrictedClient()
unrestrictedClient := clhttp.NewUnrestrictedClientWithTransportConfig(pipelineHTTPTransportConfig(cfg))

// Configure and optionally start the audit log forwarder service
auditLogger, err := audit.NewAuditLogger(appLggr, cfg.AuditLogger())
Expand Down Expand Up @@ -270,7 +279,7 @@ func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.G
Version: static.Version,
VersionTag: static.VersionTag,
DockerTag: dockerTag,
RestrictedHTTPClient: clhttp.NewRestrictedClient(cfg.Database(), appLggr),
RestrictedHTTPClient: clhttp.NewRestrictedClientWithTransportConfig(cfg.Database(), appLggr, pipelineHTTPTransportConfig(cfg)),
UnrestrictedHTTPClient: unrestrictedClient,
SecretGenerator: chainlink.FilePersistedSecretGenerator{},
GRPCOpts: grpcOpts,
Expand Down
6 changes: 6 additions & 0 deletions core/config/docs/core.toml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,12 @@ VerboseLogging = true # Default
DefaultTimeout = '15s' # Default
# MaxSize defines the maximum size for HTTP requests and responses made by `http` and `bridge` adapters.
MaxSize = '32768' # Default
# MaxIdleConns is the maximum number of idle HTTP connections kept across all hosts for pipeline adapters.
MaxIdleConns = 100 # Default
# MaxIdleConnsPerHost is the maximum number of idle HTTP connections kept per host for pipeline adapters.
MaxIdleConnsPerHost = 100 # Default
# IdleConnTimeout is how long an idle HTTP connection is kept before being closed.
IdleConnTimeout = '90s' # Default

# Deprecated: FluxMonitor job type has been removed. These settings are accepted for backwards-compatible
# config parsing only and have no effect.
Expand Down
3 changes: 3 additions & 0 deletions core/config/job_pipeline_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import (
type JobPipeline interface {
DefaultHTTPLimit() int64
DefaultHTTPTimeout() commonconfig.Duration
HTTPTransportMaxIdleConns() int
HTTPTransportMaxIdleConnsPerHost() int
HTTPTransportIdleConnTimeout() time.Duration
MaxRunDuration() time.Duration
MaxSuccessfulRuns() uint64
ReaperInterval() time.Duration
Expand Down
16 changes: 14 additions & 2 deletions core/config/toml/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1406,8 +1406,11 @@ func (j *JobPipeline) setFrom(f *JobPipeline) {
}

type JobPipelineHTTPRequest struct {
DefaultTimeout *commonconfig.Duration
MaxSize *utils.FileSize
DefaultTimeout *commonconfig.Duration
MaxSize *utils.FileSize
MaxIdleConns *int64
MaxIdleConnsPerHost *int64
IdleConnTimeout *commonconfig.Duration
}

func (j *JobPipelineHTTPRequest) setFrom(f *JobPipelineHTTPRequest) {
Expand All @@ -1417,6 +1420,15 @@ func (j *JobPipelineHTTPRequest) setFrom(f *JobPipelineHTTPRequest) {
if v := f.MaxSize; v != nil {
j.MaxSize = v
}
if v := f.MaxIdleConns; v != nil {
j.MaxIdleConns = v
}
if v := f.MaxIdleConnsPerHost; v != nil {
j.MaxIdleConnsPerHost = v
}
if v := f.IdleConnTimeout; v != nil {
j.IdleConnTimeout = v
}
}

// FluxMonitor is retained for backwards-compatible TOML parsing only.
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ require (
github.com/smartcontractkit/chain-selectors v1.0.103
github.com/smartcontractkit/chainlink-automation v0.8.1
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260506144252-c100eabfda74
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260518100439-9564f35fd264
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260624200440-40e3d145bcd5
github.com/smartcontractkit/chainlink-common/keystore v1.1.0
github.com/smartcontractkit/chainlink-data-streams v0.1.14-0.20260518171946-ff9530595155
github.com/smartcontractkit/chainlink-deployments-framework v0.103.0
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions core/services/chainlink/config_job_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ func (j *jobPipelineConfig) DefaultHTTPTimeout() commonconfig.Duration {
return *j.c.HTTPRequest.DefaultTimeout
}

func (j *jobPipelineConfig) HTTPTransportMaxIdleConns() int {
return int(*j.c.HTTPRequest.MaxIdleConns)
}

func (j *jobPipelineConfig) HTTPTransportMaxIdleConnsPerHost() int {
return int(*j.c.HTTPRequest.MaxIdleConnsPerHost)
}

func (j *jobPipelineConfig) HTTPTransportIdleConnTimeout() time.Duration {
return j.c.HTTPRequest.IdleConnTimeout.Duration()
}

func (j *jobPipelineConfig) MaxRunDuration() time.Duration {
return j.c.MaxRunDuration.Duration()
}
Expand Down
3 changes: 3 additions & 0 deletions core/services/chainlink/config_job_pipeline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ func TestJobPipelineConfigTest(t *testing.T) {
d, err := commonconfig.NewDuration(1 * time.Minute)
require.NoError(t, err)
assert.Equal(t, d, jp.DefaultHTTPTimeout())
assert.Equal(t, 100, jp.HTTPTransportMaxIdleConns())
assert.Equal(t, 100, jp.HTTPTransportMaxIdleConnsPerHost())
assert.Equal(t, 90*time.Second, jp.HTTPTransportIdleConnTimeout())
assert.Equal(t, 1*time.Hour, jp.MaxRunDuration())
assert.Equal(t, uint64(123456), jp.MaxSuccessfulRuns())
assert.Equal(t, 4*time.Hour, jp.ReaperInterval())
Expand Down
10 changes: 8 additions & 2 deletions core/services/chainlink/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,11 @@ func TestConfig_Marshal(t *testing.T) {
ResultWriteQueueDepth: ptr[uint32](10),
VerboseLogging: ptr(false),
HTTPRequest: toml.JobPipelineHTTPRequest{
MaxSize: ptr[utils.FileSize](100 * utils.MB),
DefaultTimeout: commoncfg.MustNewDuration(time.Minute),
MaxSize: ptr[utils.FileSize](100 * utils.MB),
DefaultTimeout: commoncfg.MustNewDuration(time.Minute),
MaxIdleConns: ptr[int64](100),
MaxIdleConnsPerHost: ptr[int64](100),
IdleConnTimeout: commoncfg.MustNewDuration(90 * time.Second),
},
}
full.FluxMonitor = toml.FluxMonitor{ //nolint:staticcheck // deprecated config surface must match embedded config-full.toml
Expand Down Expand Up @@ -997,6 +1000,9 @@ VerboseLogging = false
[JobPipeline.HTTPRequest]
DefaultTimeout = '1m0s'
MaxSize = '100.00mb'
MaxIdleConns = 100
MaxIdleConnsPerHost = 100
IdleConnTimeout = '1m30s'
`},
{"OCR", Config{Core: toml.Core{OCR: full.OCR}}, `[OCR]
Enabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ VerboseLogging = true
[JobPipeline.HTTPRequest]
DefaultTimeout = '15s'
MaxSize = '32.77kb'
MaxIdleConns = 100
MaxIdleConnsPerHost = 100
IdleConnTimeout = '1m30s'

[FluxMonitor]
DefaultTransactionQueueDepth = 1
Expand Down
3 changes: 3 additions & 0 deletions core/services/chainlink/testdata/config-full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ VerboseLogging = false
[JobPipeline.HTTPRequest]
DefaultTimeout = '1m0s'
MaxSize = '100.00mb'
MaxIdleConns = 100
MaxIdleConnsPerHost = 100
IdleConnTimeout = '1m30s'

[FluxMonitor]
DefaultTransactionQueueDepth = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ VerboseLogging = true
[JobPipeline.HTTPRequest]
DefaultTimeout = '30s'
MaxSize = '32.77kb'
MaxIdleConns = 100
MaxIdleConnsPerHost = 100
IdleConnTimeout = '1m30s'

[FluxMonitor]
DefaultTransactionQueueDepth = 1
Expand Down
2 changes: 1 addition & 1 deletion deployment/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ require (
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260511195239-0f6e1b177fc7
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260504204047-af9826978b72
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260518100439-9564f35fd264
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260624200440-40e3d145bcd5
github.com/smartcontractkit/chainlink-common/keystore v1.1.0
github.com/smartcontractkit/chainlink-deployments-framework v0.103.0
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260519095745-ddfc812d06a0
Expand Down
4 changes: 2 additions & 2 deletions deployment/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ require (
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc
github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260428133800-3b1484e8b1fd
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260518100439-9564f35fd264
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260624200440-40e3d145bcd5
github.com/smartcontractkit/chainlink-common/keystore v1.1.0
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10
github.com/smartcontractkit/chainlink-data-streams v0.1.14-0.20260518171946-ff9530595155
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260506144252-c100eabfda74
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260506144252-c100eabfda74
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260511195239-0f6e1b177fc7
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260518100439-9564f35fd264
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260624200440-40e3d145bcd5
github.com/smartcontractkit/chainlink-common/keystore v1.1.0
github.com/smartcontractkit/chainlink-deployments-framework v0.103.0
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260519095745-ddfc812d06a0
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion integration-tests/load/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ require (
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260506144252-c100eabfda74
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260506144252-c100eabfda74
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260511195239-0f6e1b177fc7
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260518100439-9564f35fd264
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260624200440-40e3d145bcd5
github.com/smartcontractkit/chainlink-deployments-framework v0.103.0
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260519095745-ddfc812d06a0
github.com/smartcontractkit/chainlink-testing-framework/framework v0.16.1
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/load/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion system-tests/lib/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ require (
github.com/smartcontractkit/chain-selectors v1.0.103
github.com/smartcontractkit/chainlink-aptos v0.0.0-20260507123701-77fc93b573bb
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260518100439-9564f35fd264
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260624200440-40e3d145bcd5
github.com/smartcontractkit/chainlink-common/keystore v1.1.0
github.com/smartcontractkit/chainlink-deployments-framework v0.103.0
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260519095745-ddfc812d06a0
Expand Down
4 changes: 2 additions & 2 deletions system-tests/lib/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion system-tests/tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ require (
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.34.0
github.com/smartcontractkit/chain-selectors v1.0.103
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260518100439-9564f35fd264
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260624200440-40e3d145bcd5
github.com/smartcontractkit/chainlink-common/keystore v1.1.0
github.com/smartcontractkit/chainlink-deployments-framework v0.103.0
github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260403151002-2c91155b5501
Expand Down
Loading
Loading