我是 Hangfire 的新手,所以可能我在某个地方搞砸了。我的 Hangfire 配置如下:https ://github.com/HangfireIO/Hangfire#installation
但不是:
config.UseSqlServerStorage("<connection string or its name>");
我有:
config.UsePostgreSqlStorage("Server=127.0.0.1;Port=5432;User Id=postgres;Password=pwd;Database=Hangfire");
所以我在我的数据库中创建了一个 Hangfire 数据库。
然后,我正在构建和运行我的项目。没关系。在我的 postgres 中创建 Hangfire DB 中的所有表。它工作得很好。
但是,当我尝试时:
BackgroundJob.Enqueue(() => HubService.SendPushNotificationToUsers(threadParticipants, messageApi.SenderId, messageApi.SenderName, messageApi.ThreadId, messageApi.Content));
我收到 InnerMessage 异常:
"Timeout while getting a connection from pool." postgres
我错过了什么吗?