HangfireIO / Hangfire

An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
https://www.hangfire.io
Other
9.38k stars 1.7k forks source link

Timeout even thou its connecting #226

Closed erophames closed 10 years ago

erophames commented 10 years ago

I seem to be running into an issue with hangfire when i copy it to my server. When i have redis running locally on my laptop it connects immediately, the second i copy it over to the server (with a redis instance running on it) it timeout. I've checked the firewall, checked the connection string. So i thought okay perhaps there is a redis issue. So i installed the SQL Server storage, it connects i see the tables get made then when i try to add a job i get the same issue a again.

Topshelf.Hosts.ConsoleRunHost Error: 0 : An exception occurred, System.Reflection.TargetInvocationException: Exception h
as been thrown by the target of an invocation. ---> System.InvalidOperationException: Timeout expired.  The timeout peri
od 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.
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`
1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnection
Factory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Hangfire.SqlServer.SqlServerStorage.GetConnection()
   at Hangfire.RecurringJobManager.AddOrUpdate(String recurringJobId, Job job, String cronExpression)
   at Falcon.Web.Api.StartUp.Configuration(IAppBuilder appBuilder) in d:\AtlasDev\Web\Falcon\Falcon.Web.Api\StartUp.cs:l
ine 262
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters
, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Owin.Loader.DefaultLoader.<>c__DisplayClass1.<LoadImplementation>b__0(IAppBuilder builder)
   at Microsoft.Owin.Hosting.Engine.HostingEngine.ResolveApp(StartContext context)
   at Microsoft.Owin.Hosting.Engine.HostingEngine.Start(StartContext context)
   at Microsoft.Owin.Hosting.Starter.HostingStarter.Start(StartOptions options)
   at Falcon.Web.Api.Engine.Start() in d:\AtlasDev\Web\Falcon\Falcon.Web.Api\Engine.cs:line 31
   at Falcon.Web.Api.Program.<>c__DisplayClass5.<Main>b__3(Engine o) in d:\AtlasDev\Web\Falcon\Falcon.Web.Api\Program.cs
:line 32
   at Topshelf.ServiceConfiguratorExtensions.<>c__DisplayClass7`1.<WhenStarted>b__6(T service, HostControl control)
   at Topshelf.Builders.DelegateServiceBuilder`1.DelegateServiceHandle.Start(HostControl hostControl)
   at Topshelf.Hosts.ConsoleRunHost.Run()

Anyone had a similar issue?

erophames commented 10 years ago

Moved away from hangfire due to this issue.

Caldas commented 9 years ago

@FabianFrancoRoldan I have a Hangfire with Redis and another 2 projects with SQL Server and I never faced this problem. What version are you running?

erophames commented 9 years ago

@Caldas It was the latest versions.