diff --git a/conf/defaults.ini b/conf/defaults.ini index 27d9dda778a..72b598b1df7 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -126,7 +126,8 @@ connstr = # This enables data proxy logging, default is false logging = false -# How long the data proxy should wait before timing out default is 30 (seconds) +# How long the data proxy waits before timing out, default is 30 seconds. +# This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set. timeout = 30 # If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false. @@ -234,7 +235,7 @@ versions_to_keep = 20 min_refresh_interval = 5s # Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json" -default_home_dashboard_path = +default_home_dashboard_path = #################################### Users ############################### [users] diff --git a/conf/sample.ini b/conf/sample.ini index d58ba4b5b98..3b51f10414f 100644 --- a/conf/sample.ini +++ b/conf/sample.ini @@ -127,7 +127,8 @@ # This enables data proxy logging, default is false ;logging = false -# How long the data proxy should wait before timing out default is 30 (seconds) +# How long the data proxy waits before timing out, default is 30 seconds. +# This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set. ;timeout = 30 # If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false. @@ -233,7 +234,7 @@ ;min_refresh_interval = 5s # Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json" -;default_home_dashboard_path = +;default_home_dashboard_path = #################################### Users ############################### [users] @@ -459,7 +460,7 @@ ;from_name = Grafana # EHLO identity in SMTP dialog (defaults to instance_name) ;ehlo_identity = dashboard.example.com -# SMTP startTLS policy (defaults to 'OpportunisticStartTLS') +# SMTP startTLS policy (defaults to 'OpportunisticStartTLS') ;startTLS_policy = NoStartTLS [emails] diff --git a/docs/sources/administration/configuration.md b/docs/sources/administration/configuration.md index ec42e578457..74d1389c0f8 100644 --- a/docs/sources/administration/configuration.md +++ b/docs/sources/administration/configuration.md @@ -383,7 +383,9 @@ This enables data proxy logging, default is `false`. ### timeout -How long the data proxy should wait before timing out. Default is `30` (seconds) +How long the data proxy should wait before timing out. Default is 30 seconds. + +This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set. ### send_user_header diff --git a/pkg/models/datasource_cache.go b/pkg/models/datasource_cache.go index af80d1d50e7..c67c8f1e8af 100644 --- a/pkg/models/datasource_cache.go +++ b/pkg/models/datasource_cache.go @@ -51,7 +51,7 @@ func (ds *DataSource) GetHttpClient() (*http.Client, error) { } return &http.Client{ - Timeout: 30 * time.Second, + Timeout: time.Duration(setting.DataProxyTimeout) * time.Second, Transport: transport, }, nil }