Added setting for query timeout

Created on 4 January 2021, almost 4 years ago
Updated 7 February 2024, 9 months ago

Problem/Motivation

API requests to GA can sometime be very slow unfortunately. We regularly see timeout errors in the logs.
The problem is that by using drupal_http_request() the default timeout is 30 seconds, whereas the docs say a query can take up to 180 seconds. Using 180 seconds as default on the other hand would lead to very long page loads or timeouts by the webserver (depending on the config).

Proposed resolution

This patch adds a variable that allows to change the default timeout.
Also it adds a parameter to google_analytics_reports_api_gafeed() so that the timeout can be changed when the API is used programmatically.

Feature request
Status

Fixed

Version

3.0

Component

API module

Created by

🇦🇹Austria mh86

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024