-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: log finch pool health stats periodically #191
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KaylaBrady
requested review from
boringcactus
and removed request for
a team
September 13, 2024 20:50
KaylaBrady
commented
Sep 13, 2024
lib/mbta_v3_api/stream/instance.ex
Outdated
@@ -131,7 +131,7 @@ defmodule MBTAV3API.Stream.Instance do | |||
|
|||
consumer_subscribers = | |||
if consumer_dest do | |||
Registry.count_match(MBTAV3API.Stream.PubSub, consumer_dest, :_) | |||
Registry.lookup(MBTAV3API.Stream.PubSub, consumer_dest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny add in while looking at the existing health logs. I've noticed some timeouts while reporting these health logs:
62db153750ed 21:18:03.911 [error] GenServer #PID<0.2135.0> terminating
62db153750ed ** (stop) exited in: :sys.get_state(#PID<0.3383.0>)
62db153750ed ** (EXIT) time out
62db153750ed (stdlib 5.1.1) sys.erl:340: :sys.send_system_msg/2
62db153750ed (stdlib 5.1.1) sys.erl:139: :sys.get_state/1
62db153750ed (mobile_app_backend 0.1.0) lib/mbta_v3_api/stream/instance.ex:104: MBTAV3API.Stream.Instance.stage_health/1
62db153750ed (mobile_app_backend 0.1.0) lib/mbta_v3_api/stream/instance.ex:85: MBTAV3API.Stream.Instance.check_health/1
62db153750ed (mobile_app_backend 0.1.0) lib/mbta_v3_api/stream/supervisor.ex:34: anonymous fn/2 in MBTAV3API.Stream.Supervisor.log_health/0
62db153750ed (elixir 1.15.7) lib/enum.ex:2510: Enum."-reduce/3-lists^foldl/2-0-"/3
62db153750ed (mobile_app_backend 0.1.0) lib/mbta_v3_api/stream/supervisor.ex:33: MBTAV3API.Stream.Supervisor.log_health/0
62db153750ed (mobile_app_backend 0.1.0) lib/mbta_v3_api/stream/health.ex:19: MBTAV3API.Stream.Health.handle_info/2
Since we only care about the registry key, lookup should be faster than scanning to match the full registry.
KaylaBrady
force-pushed
the
kb-pool-logs
branch
from
September 13, 2024 20:59
291870a
to
93f0f7f
Compare
Coverage of commit
|
boringcactus
approved these changes
Sep 16, 2024
Coverage of commit
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
No ticket, but identified as an observability improvement while working on
Predictions Scalability: new channel that publishes predictions updates in chunks.
What is this PR for?
We suspect there are some issues with request pooling based on unexpectedly slow req response logs under load testing. This will help us identify if that is the case (slack thread)