You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We sometimes encounter this error in our production release:
{:error,%Finch.Error{reason: :read_only}}
This error indicates that the checked out pool is close for writing and only able to read responses. If the pool is in :disconnected or :connected_read_only state, it's not able to make requests (I'll refer these two states as not_ready from now on). This problem is worsen if the reconnect process takes longer, eg: when network connections are unstable.
My point is we should be able to filter out not_ready pools while performing lookup. Right now, there's no way to efficiently get pool's current state other than sending a message to it (GenServer.call, :sys.get_state, ...). How about lifting the pool state to an ets table?
The text was updated successfully, but these errors were encountered:
I agree, when we lookup a pool/connection (for http2 they are the same thing), we should not return connections that are not ready for use. Maybe the connection should unregister itself from the Registry whenever it is not ready to accept new requests, and re-registry itself once it is ready again?
HTTP2 connections will unregister themselves from the pool once enter connected_read_only and disconnected states, and register themselves once they reconnect.
Fixessneako#216
We sometimes encounter this error in our production release:
This error indicates that the checked out pool is close for writing and only able to read responses. If the pool is in
:disconnected
or:connected_read_only
state, it's not able to make requests (I'll refer these two states asnot_ready
from now on). This problem is worsen if the reconnect process takes longer, eg: when network connections are unstable.My point is we should be able to filter out
not_ready
pools while performing lookup. Right now, there's no way to efficiently get pool's current state other than sending a message to it (GenServer.call, :sys.get_state, ...). How about lifting the pool state to an ets table?The text was updated successfully, but these errors were encountered: