{"action":"created","issue":{"url":"https://api.github.com/repos/pieceofsummer/Hangfire.Console/issues/54","repository_url":"https://api.github.com/repos/pieceofsummer/Hangfire.Console","labels_url":"https://api.github.com/repos/pieceofsummer/Hangfire.Console/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/pieceofsummer/Hangfire.Console/issues/54/comments","events_url":"https://api.github.com/repos/pieceofsummer/Hangfire.Console/issues/54/events","html_url":"https://github.com/pieceofsummer/Hangfire.Console/issues/54","id":299516412,"number":54,"title":"Hangfire.Console unhandled exception crashes BackgroundJobServer","user":{"login":"bbollard","id":9120688,"avatar_url":"https://avatars0.githubusercontent.com/u/9120688?v=4","gravatar_id":"","url":"https://api.github.com/users/bbollard","html_url":"https://github.com/bbollard","followers_url":"https://api.github.com/users/bbollard/followers","following_url":"https://api.github.com/users/bbollard/following{/other_user}","gists_url":"https://api.github.com/users/bbollard/gists{/gist_id}","starred_url":"https://api.github.com/users/bbollard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbollard/subscriptions","organizations_url":"https://api.github.com/users/bbollard/orgs","repos_url":"https://api.github.com/users/bbollard/repos","events_url":"https://api.github.com/users/bbollard/events{/privacy}","received_events_url":"https://api.github.com/users/bbollard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-22T21:34:18Z","updated_at":"2018-02-22T21:47:44Z","closed_at":"2018-02-22T21:47:44Z","author_association":"NONE","body":"Hi,\r\nI'm evaluating Hangfire and your cool extension, Hangfire.Console. I am experiencing what appears to be, based on the stack trace, SQL based unhandled exceptions within the Hangfire.Console.Storage.ConsoleStorage.AddLine method is taking down the Hangfire BackgroundJobServer. I don't know if there is a certain design pattern for how you use Hangfire.Console or how your run the BackgroundJobServer to make it more resilient to these types of issues.\r\n\r\nYour feedback is appreciated."},"comment":{"url":"https://api.github.com/repos/pieceofsummer/Hangfire.Console/issues/comments/367833515","html_url":"https://github.com/pieceofsummer/Hangfire.Console/issues/54#issuecomment-367833515","issue_url":"https://api.github.com/repos/pieceofsummer/Hangfire.Console/issues/54","id":367833515,"user":{"login":"bbollard","id":9120688,"avatar_url":"https://avatars0.githubusercontent.com/u/9120688?v=4","gravatar_id":"","url":"https://api.github.com/users/bbollard","html_url":"https://github.com/bbollard","followers_url":"https://api.github.com/users/bbollard/followers","following_url":"https://api.github.com/users/bbollard/following{/other_user}","gists_url":"https://api.github.com/users/bbollard/gists{/gist_id}","starred_url":"https://api.github.com/users/bbollard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbollard/subscriptions","organizations_url":"https://api.github.com/users/bbollard/orgs","repos_url":"https://api.github.com/users/bbollard/repos","events_url":"https://api.github.com/users/bbollard/events{/privacy}","received_events_url":"https://api.github.com/users/bbollard/received_events","type":"User","site_admin":false},"created_at":"2018-02-22T21:47:44Z","updated_at":"2018-02-22T21:47:44Z","author_association":"NONE","body":"System.Transactions Critical: 0 : <TraceRecord xmlns=\"http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord\" Severity=\"Critical\"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>HangfireConsoleServer.exe</AppDomain><Exception><ExceptionType>System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.</Message><StackTrace>   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&amp;amp; connection)\r\n   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)\r\n   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)\r\n   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)\r\n   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)\r\n   at System.Data.SqlClient.SqlConnection.Open()\r\n   at Hangfire.SqlServer.SqlServerStorage.CreateAndOpenConnection()\r\n   at Hangfire.SqlServer.SqlServerStorage.UseConnection[T](DbConnection dedicatedConnection, Func`2 func)\r\n   at Hangfire.SqlServer.SqlServerStorage.UseTransaction[T](DbConnection dedicatedConnection, Func`3 func, Nullable`1 isolationLevel)\r\n   at Hangfire.SqlServer.SqlServerStorage.UseTransaction(DbConnection dedicatedConnection, Action`2 action)\r\n   at Hangfire.SqlServer.SqlServerWriteOnlyTransaction.Commit()\r\n   at Hangfire.Console.Storage.ConsoleStorage.AddLine(ConsoleId consoleId, ConsoleLine line)\r\n   at Hangfire.Console.Server.ConsoleContext.AddLine(ConsoleLine line)\r\n   at Hangfire.Console.Server.ConsoleContext.WriteLine(String value, ConsoleTextColor color)\r\n   at Hangfire.Console.ConsoleExtensions.WriteLine(PerformContext context, String value)\r\n   at HangFileEval.MyWorkerClass.WorkerThread(Object ctx) in C:\\Users\\xxx\\Documents\\Visual Studio 2017\\Projects\\HangFileEval\\HangFileEval\\MyWorkerClass.cs:line 190\r\n   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\r\n   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\r\n   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n   at System.Threading.ThreadHelper.ThreadStart(Object obj)</StackTrace><ExceptionString>System.InvalidOperationException: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.\r\n   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&amp;amp; connection)\r\n   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)\r\n   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)\r\n   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)\r\n   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)\r\n   at System.Data.SqlClient.SqlConnection.Open()\r\n   at Hangfire.SqlServer.SqlServerStorage.CreateAndOpenConnection()\r\n   at Hangfire.SqlServer.SqlServerStorage.UseConnection[T](DbConnection dedicatedConnection, Func`2 func)\r\n   at Hangfire.SqlServer.SqlServerStorage.UseTransaction[T](DbConnection dedicatedConnection, Func`3 func, Nullable`1 isolationLevel)\r\n   at Hangfire.SqlServer.SqlServerStorage.UseTransaction(DbConnection dedicatedConnection, Action`2 action)\r\n   at Hangfire.SqlServer.SqlServerWriteOnlyTransaction.Commit()\r\n   at Hangfire.Console.Storage.ConsoleStorage.AddLine(ConsoleId consoleId, ConsoleLine line)\r\n   at Hangfire.Console.Server.ConsoleContext.AddLine(ConsoleLine line)\r\n   at Hangfire.Console.Server.ConsoleContext.WriteLine(String value, ConsoleTextColor color)\r\n   at Hangfire.Console.ConsoleExtensions.WriteLine(PerformContext context, String value)\r\n   at HangFileEval.MyWorkerClass.WorkerThread(Object ctx) in C:\\Users\\xxx\\Documents\\Visual Studio 2017\\Projects\\HangFileEval\\HangFileEval\\MyWorkerClass.cs:line 190\r\n   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\r\n   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\r\n   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n   at System.Threading.ThreadHelper.ThreadStart(Object obj)</ExceptionString></Exception></TraceRecord>\r\nAn unhandled exception of type 'System.InvalidOperationException' occurred in System.Data.dll\r\n\r\nI am using SQL Server 2016 and my connection string is not defining any connection pool settings.\r\n\r\nRegards,\r\nBrian"}}
{"actor":{"display_login":"bbollard"}}