curl timeout when logging to Grafana Cloud

Created on 23 December 2022, over 2 years ago
Updated 18 January 2023, over 2 years ago

Problem/Motivation

When attempting to log to the Grafana Cloud (grafana.net) the connection runs in a very tight timeout:

"Curl error (code 28): Resolving timed out after 100 milliseconds"

Proposed resolution

Allow curl_options to be set in services yaml by using curl constants - not only their integer representations - to loosen the tight timeouts defined in https://github.com/itspire/monolog-loki/blob/master/src/main/php/Handler...

In this case following options are required:

define('CURLOPT_CONNECTTIMEOUT_MS', 156);
define('CURLOPT_TIMEOUT_MS', 155);

But when I think further about this situation, having a slow logging handler (because of network latency) will cause a
noticeable negativ impact on response times of the Drupal site. Hence using something like the BufferHandler of monolog
would possibly become a requirement too.

Remaining tasks

TBD

User interface changes

TBD

API changes

None - I guess

Data model changes

None

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇦🇹Austria guedressel

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.

  • 🇧🇪Belgium borisson_ Mechelen, 🇧🇪

    Increasing this is not a good idea because of the mentioned impact on performance. I think we should keep these defaults as-is because they keep people from creating very slow websites.

  • 🇦🇹Austria guedressel

    The BufferHandler did a very good job for me so far to not have performance impacted by remote logging. When mentioned in the documentation of this potential configuration option clearly and verbose enough, I would expect to have this "advanced option" be useful for setups like mine.

Production build 0.71.5 2024