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

RejectedExceptions should include the configuration keys that users can tune the thresholds with #48

Open
robhruska opened this issue Nov 19, 2015 · 0 comments

Comments

@robhruska
Copy link
Member

Here's a rejected exception from Mjolnir's current version:

2015-11-19 16:13:54,871 ip-0AB43960 [WARN ] [Hudl.Multiverse.Web.Mvc.Attributes.Usage] [209] [request_id=cf5d9a05] [requested_branch=(null)] Error writing usage log AttemptedFields=Hudl|UnFollow|Topic
Type=System.AggregateException
Message=One or more errors occurred.
Data:
    Signature=e017ce6d
Stack Trace: <empty>
==== Inner Exception ====
Type=Hudl.Mjolnir.Command.CommandFailedException
Message=Command rejected
Data:
    Command=users.IUserService-GetUser
    Timeout=15000
    Status=Rejected
    Breaker=user
    Pool=user
Stack Trace:
   at Hudl.Mjolnir.Command.Command`1.Fallback(CommandFailedException instigator) in z:\work\f128c7cb4a95d90e\Hudl.Mjolnir\Command\Command.cs:line 503
   at Hudl.Mjolnir.Command.Command`1.TryFallback(CommandFailedException instigator) in z:\work\f128c7cb4a95d90e\Hudl.Mjolnir\Command\Command.cs:line 466
   at Hudl.Mjolnir.Command.Command`1.<InvokeAsync>d__9.MoveNext() in z:\work\f128c7cb4a95d90e\Hudl.Mjolnir\Command\Command.cs:line 320
==== Inner Exception ====
Type=Hudl.Mjolnir.ThreadPool.IsolationThreadPoolRejectedException
Message=Exception of type 'Hudl.Mjolnir.ThreadPool.IsolationThreadPoolRejectedException' was thrown.
Data:
Stack Trace:
   at Hudl.Mjolnir.ThreadPool.StpIsolationThreadPool.Enqueue[TResult](Func`1 func) in z:\work\f128c7cb4a95d90e\Hudl.Mjolnir\ThreadPool\StpIsolationThreadPool.cs:line 107
   at Hudl.Mjolnir.Command.Command`1.ExecuteInIsolation(CancellationToken cancellationToken) in z:\work\f128c7cb4a95d90e\Hudl.Mjolnir\Command\Command.cs:line 344
   at Hudl.Mjolnir.Command.Command`1.<InvokeAsync>d__9.MoveNext() in z:\work\f128c7cb4a95d90e\Hudl.Mjolnir\Command\Command.cs:line 293

The message (Command rejected) is pretty terse. It also means that users have to go dig through documentation to figure out how to re-tune the thread pool.

A clearer message might be something like:

Command was rejected because it exceeded a thread pool (concurrency) limit of 10. To adjust this value, set the mjolnir.pools.user.threadCount configuration value.

Look for contextual opportunities to explain why an exception happened and how a user can change things to fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant