Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Replace infinite timeouts with sensible defaults. #86

Merged
merged 2 commits into from
Jun 15, 2017

Conversation

kjnilsson
Copy link
Contributor

@kjnilsson kjnilsson commented Jun 15, 2017

Change gen_server:call timeouts to use a configurable
default. Also make supervisor shutdown timeouts use
the SUPERVISOR_WAIT value.

Fixes #85.
[#147178169]

@@ -35,3 +35,6 @@
{<<"consumer_cancel_notify">>, bool, true},
{<<"connection.blocked">>, bool, true},
{<<"authentication_failure_close">>, bool, true}]).

-define(CALL_TIMEOUT,
rabbit_misc:get_env(amqp_client, gen_server_call_timeout, 30000)).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is on the hot code path, we should probably do what we do in the server: in process caching of the timeout value, since all rabbit_misc:get_env/3 (application:get_env*) requests go through a single gen_server.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

Change gen_server:call timeouts to use a configurable
default that is cached inside each process' process dictionary.
Also make supervisor shutdown timeouts use
the SUPERVISOR_WAIT value.

[#147178169]
To match default server heartbeat timeout.

While at it, increase initial connection timeout to 60s
to match (heartbeat timeout doesn't matter here specifically but
related in general).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants