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

高并发下的异常 #111

Closed
nodyang opened this issue Jul 22, 2019 · 10 comments
Closed

高并发下的异常 #111

nodyang opened this issue Jul 22, 2019 · 10 comments

Comments

@nodyang
Copy link

nodyang commented Jul 22, 2019

Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple a

经常处理这个问题。是不是我那个地方配置出问题了

@shuxinqin
Copy link
Owner

是不是连接池连接耗完?

@nodyang
Copy link
Author

nodyang commented Jul 23, 2019

这个我也不太清楚 我用的autofac 想找你确认下是不是连接池满了
cb.Register(x =>
new MsSqlContext(AutofacContainer.Container.Resolve<IOptions>().Value
.Mdm))
.Keyed(EnumSqlState.Mdm).InstancePerLifetimeScope()
.OnActivated(x =>
{

            })
            .OnRelease((x) =>
            {
                Console.WriteLine("释放资源"+x.ToString());
                
            });

日志也打印了。释放了资源。

@shuxinqin
Copy link
Owner

根据错误消息,貌似跟框架没关系,你百度下吧。

@nodyang
Copy link
Author

nodyang commented Jul 23, 2019

image
源码我也跟踪了 。也释放了。我查查吧。赶紧是数据库链接出问题了

@nodyang
Copy link
Author

nodyang commented Jul 23, 2019

https://www.cnblogs.com/xiaxiaolu/p/10309064.html 跟我的现象差不多。但我用的2014 的 数据库。会不会是System.Data.sqlClient 版本的问题?

@shuxinqin
Copy link
Owner

你可以引入指定的System.Data.sqlClient 版本试试

@nodyang
Copy link
Author

nodyang commented Jul 23, 2019

1 System.Data.SqlClient 4.6.1 +sqlConnect
image 基本满足要求
2 System.Data.SqlClient 4.4.6 +sqlConnect 好多的问题。。
3 github 老外的建议。不要去兼容4.0
4 大佬 又没有可能把Chole net core 版本。如果不提供我们可能深度去改下。我们打算全core 话。到时候多沟通。但公司不一定同意开源。。哎

@shuxinqin
Copy link
Owner

不用改chloe的源码,在你的项目中引入指定的System.Data.SqlClient 版本就行。

@shuxinqin
Copy link
Owner

目前chloe默认依赖System.Data.SqlClient 4.4.0。你可以在你的项目中引入比4.4.0版本号高的版本。兼容的。

@nodyang
Copy link
Author

nodyang commented Jul 23, 2019

image
我下午折腾下

@nodyang nodyang closed this as completed Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants