Fibers not being purged when an EXPLAIN query is run in an ActiveSupport::Notification callback #4874
Replies: 1 comment 1 reply
-
I reported this issue (that As a result, I rolled back graphql-ruby's direct usage of It's really too bad because if I reported the same bug to Async, too: socketry/async#295. I left AsyncDataloader in GraphQL-Ruby, but greatly reduced its scope. Instead of running all GraphQL execution inside Are you able to replicate the AppMap-related issue on the latest graphql-ruby? Does the |
Beta Was this translation helpful? Give feedback.
-
I have been working on an open source app AppMap. There is an issue (#349) that I have been trying to solve but am completely stumped. This only happens when the Rails app has graphql-ruby, appmap, and has the configuration
Rails.applcation.config.active_support.isolation_level = :fiber
.AppMap is a gem that sets up hooks on ActiveSupport::Notification subscriptions [hook]. Essentially, when a graphql query is made, it triggers the
ActiveSupport::Notification
subscriber which runs a SQL EXPLAIN.When the EXPLAIN query runs, it consumes a connection from the connection pool, but for some reason the terminated connections are not cleared out once the pool has been filled, which I believe is the way it's supposed to work.
Here's a video of the experience (6 requests with only 5 connections):
Here's the code that's performing the EXPLAIN query:
Does anyone have any thoughts on why this might be happening?
Beta Was this translation helpful? Give feedback.
All reactions