用户的活动连接数已超过“max#u user#u connections”

4sup72z8  于 2021-06-24  发布在  Mysql
关注(0)|答案(0)|浏览(257)

我理解
用户已经有超过“max\u user\u connections”个活动连接
已经有很多答案了。但这是关于战火的。
我正在使用hangfire进行背景处理。它第一次运行良好,只有在我开始申请的时候。但现在不是了。所以现在当我试图打开数据库看看发生了什么,它给了我这个错误。
我的想法是,它无法执行队列中的任何其他项,因为它无法连接到数据库。
而且,我不能打开hangfire Jmeter 盘。它给出404错误。
我创建了owin startup.cs作为

using Hangfire;
using Microsoft.Owin;
using Owin;

[assembly: OwinStartup(typeof(MyApp.Startup))]

namespace MyApp
{
    public class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            app.UseHangfireDashboard();
        }
    }
}

此外,我已经把代码按要求在 Application_StartGlobal.asax.cs 作为:

var options = new Hangfire.MySql.MySqlStorageOptions
{
    QueuePollInterval = TimeSpan.FromSeconds(15), // Default value
    PrepareSchemaIfNecessary = false
};
Hangfire.MySql.MySqlStorage storage = new Hangfire.MySql.MySqlStorage("hangfire2", options);
GlobalConfiguration.Configuration.UseStorage(storage);
_backgroundJobServer = new BackgroundJobServer();

我有什么办法可以避免吗 max_user_connection 错误?或者实际上,打后台电话。我是这样称呼它的: BackgroundJob.Enqueue(() => MyMethod()); 更新:超时后,我看到了数据库,发现第二个操作没有插入到数据库中,但是第三个操作插入了,但是给出了作业的状态,如下所示: Retry attempt 1 of 10: Exception has been thrown by the target of an inv...

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题