Skip to content
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

Add support to queue_target and queue_interval #172

Merged
merged 3 commits into from
Aug 12, 2019

Conversation

Yamilquery
Copy link
Contributor

@Yamilquery Yamilquery commented Aug 2, 2019

To solve an issue related with connection not available and request was dropped from queue after 1652ms.

11:33:16.904 [error] GenServer {EventStore.Subscriptions.Subscription, {"$all", "Account.Workflows.GPEmailInvitationLogic"}} terminating
     ** (Protocol.UndefinedError) protocol String.Chars not implemented for %DBConnection.ConnectionError{message: "connection not available and request was dropped from queue after 1652ms. You can configure how long requests wait in the queue using :queue_target and :queue_interval. See DBConnection.start_link/2 for more information", severity: :error} of type DBConnection.ConnectionError (a struct). This protocol is implemented for the following type(s): Postgrex.Query, Postgrex.Copy, Decimal, Atom, BitString, Date, NaiveDateTime, Version.Requirement, URI, DateTime, Float, Integer, List, Time, Version
         (elixir) lib/string/chars.ex:3: String.Chars.impl_for!/1
         (elixir) lib/string/chars.ex:22: String.Chars.to_string/1
         (eventstore) lib/event_store/storage/subscription.ex:169: anonymous fn/3 in EventStore.Storage.Subscription.Ack.handle_response/3
         (logger) lib/logger.ex:862: Logger.normalize_message/2
         (logger) lib/logger.ex:687: Logger.__do_log__/3
         (eventstore) lib/event_store/storage/subscription.ex:168: EventStore.Storage.Subscription.Ack.handle_response/3
         (eventstore) lib/event_store/subscriptions/subscription_fsm.ex:611: EventStore.Subscriptions.SubscriptionFsm.checkpoint_last_seen/2
         (eventstore) lib/event_store/subscriptions/subscription_fsm.ex:577: EventStore.Subscriptions.SubscriptionFsm.ack_events/3
         (eventstore) lib/event_store/subscriptions/subscription_fsm.ex:135: EventStore.Subscriptions.SubscriptionFsm.transition/3
         (eventstore) lib/event_store/subscriptions/subscription.ex:162: EventStore.Subscriptions.Subscription.handle_call/3
         (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4
         (stdlib) gen_server.erl:690: :gen_server.handle_msg/6
         (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
     Last message (from #PID<0.3908.0>): {:ack, 3, #PID<0.3908.0>}

I did a pull request in order to support the queue_target and queue_interval options.

@slashdotdash
Copy link
Member

Thanks for the pull request Yamil.

@slashdotdash slashdotdash merged commit e52aa25 into commanded:master Aug 12, 2019
slashdotdash added a commit that referenced this pull request Aug 12, 2019
Use default values for `queue_target` and `queue_interval` from DBConnection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants