-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sentry timeouts don't work on our server #777
Comments
The defaults are applied by the underlying PHP SDK here https://github.com/getsentry/sentry-php/blob/3.x/src/Options.php#L25-L35. Another possibility could be that you're using an HTTP Client we do not "support", as in we don't apply the options here https://github.com/getsentry/sentry-php/blob/3.x/src/HttpClient/HttpClientFactory.php#L112-L164 |
@cleptric thanks for your reply I forgot to mention that our application uses Symfony framework and uses following configuration file ( sentry:
dsn: '%env(SENTRY_DSN)%'
# If you are using Monolog, you also need these additional configuration and services to log the errors correctly:
# https://docs.sentry.io/platforms/php/guides/symfony/#monolog-integration
register_error_listener: false
options:
attach_stacktrace: true
send_attempts: '%env(int:SENTRY_RESEND_ATTEMPTS)%'
http_connect_timeout: '%env(int:SENTRY_HTTP_CONNECT_TIMEOUT)%'
http_timeout: '%env(int:SENTRY_HTTP_TIMEOUT)%'
environment: '%kernel.environment%'
error_types: 'E_ALL & ~E_NOTICE & ~E_DEPRECATED'
release: '%kernel.environment%'
integrations:
- 'Sentry\Integration\IgnoreErrorsIntegration'
We try to simulate 10-second delay of Sentry application to check if timeout values are working as expected. Our application connects to SMTP server and if it rejects our request, an error is sent to Sentry. We can increase 10-second delay to 15 or 30 seconds... we just chose 10 at the moment. |
The Symfony SDK uses the PHP SDK under the hood https://github.com/getsentry/sentry-symfony/blob/master/composer.json#L31, so I just wanted to point out where the default values are coming from. I assume something is wrong with your production server, as the config values are correctly applied in my tests. If you are generally concerned about the overhead the PHP SDK is introducing to your request times, I recommend running a local Relay next to your application https://docs.sentry.io/platforms/php/guides/symfony/performance/#improve-response-time. This decreases the roundtrip time, and even if your on-premise instance is not accepting any events, the local Relay will still respond with a 200 status code. |
We made a workaround by replacing default timeout values in |
You mentioned it was working in Docker but not in your production environment. |
Hi there. Yes, I tried setting raw values in I'm not sure if it could help you, but when I was debugging the issue:
|
Please try to update the SDK |
Closing due to inactivity. |
How do you use Sentry?
Self-hosted / on-premises
SDK version
4.5.0
Steps to reproduce
We have an application, which we develop in Docker environment.
We added three options to Sentry configuration in
sentry.yaml
file:Our values are:
We tested these timeouts in Docker environment and all response times from our backend application were correct.
But when we deployed this application to our server they seems to be ignored.
We tested Sentry timeout with some page with
sleep(10);
to get response after 10 sec.This approach worked in Docker, but does not work on the server: we need to wait these 10 seconds for Sentry, but it should be quit after 2 seconds (timeout limit reached).
Can you help us in finding what we are doing wrong?
Expected result
Sentry timeout should work as expected.
Actual result
We need to wait for e..g 10 seconds for page, which simulates Sentry.
The text was updated successfully, but these errors were encountered: