I am using the PHP Sentry SDK within an API (and the JS client too at the front-end), and today I experienced an error caused by a Curl timeout which I presume is the Sentry client talking back to their host. I don’t have anything else using Curl.
It seemed to stick for so long that my 30s PHP max execution time expired, so I got a 500 error from my API.
[17-Jan-2020 02:07:40 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in api/vendor/php-http/curl-client/src/MultiRunner.php on line 87
I have basic config:
Sentry\init(['dsn' => $config['sentry_dsn']]);
It seems ironic that my error handling should break the API occasionally! So I want to defend myself from this - even if it’s rare.
Is it possible to add some configuration to Sentry or Curl to quit gracefully after 10 seconds max?
I couldn’t see anything here:
Or is there another way to make Sentry more “background” so it cannot block the main code path?