-
Notifications
You must be signed in to change notification settings - Fork 223
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
Starlette Application Stops When ElasticAPM Server is Unreachable #2031
Comments
Thanks for reporting |
The link on the title doesn't work.
|
@Kludex thanks! |
@Impro02 I'm trying to replicate it with the example you provided on the starlette discussion with the following packages:
With both python 3.10.12 and 3.11.9 the app is still responding to the /status endpoint after minutes. |
@xrmx After more investigation, the issue seems to be triggered by psutil lib. I use python 3.12.1
|
Ok, so this looks more like metrics related. Still cannot reproduce with python 3.12.3. Have you tried to update python version? |
Using python 3.12.3 seems to fix the issue. |
Closing then. |
Describe the bug:
When integrating ElasticAPM middleware with a Starlette application, the application ceases to function if the ElasticAPM server is unreachable. This occurs under various circumstances, such as an incorrect URL, proxy issues, or certificate verification failures.
To Reproduce
Environment (please complete the following information)
Additional context
Add any other context about the problem here.
This issue poses a significant risk to application reliability, as any downtime or configuration issue with the ElasticAPM server directly affects the availability of all services using the Starlette framework with ElasticAPM middleware.
Click to expand
apm = _make_apm_client( { "SERVICE_NAME": "XX", "ENVIRONMENT": "DEV", "SERVER_URL": "https://...", "SERVER_CERT": "path_to_cer", "VERIFY_SERVER_CERT": True, } ) app.add_middleware(_ElasticAPM, client=apm)requirements.txt
:Click to expand
fastapi>=0.108.0 elastic-apmThe text was updated successfully, but these errors were encountered: