当应用程序连接时发生大数据库错误时在操作完成之前超时或服务器没有响应 [英] When Application connect with large data base error occured The timeout period elapsed prior to completion of the operation or the server is not responding

查看:116
本文介绍了当应用程序连接时发生大数据库错误时在操作完成之前超时或服务器没有响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常,应用程序工作正常,但是当将该应用程序与大型数据库连接并访问每个菜单时,在操作完成之前超时时间已过或服务器没有响应.在连接字符串中增加Connect Timeout = 3600;但是没有解决的问题是解决此问题的另一种方法.

Normally Application working fine but when connect that application with large data base & visit each & every menu then The timeout period elapsed prior to completion of the operation or the server is not responding. in connection string increase Connect Timeout=3600; but problem not resolved is any another way to solve this issue

推荐答案

获得与数据库的更快连接.您的问题不在代码中,除非您需要使超时更大.它的大小取决于数据库的大小,所请求的数据量或与数据库的连接(即两个服务器之间的网络).
Get a faster connection to your database. Your problem is not in your code, unless you need to make the timeout a lot bigger. It''s in the size of the DB, the amount of data you''re requesting, or the connection to the database, that is, the network between the two servers.


它肯定不是连接数据库和应用程序所需的时间.您请求的数据过多(或来自非最佳查询的数据),这会花费大量时间.
更改您的设计:您是否需要从数据库到应用程序中获取大量数据?
优化查询,设置一些索引等,以便查询快速运行.
It is surely not the time required for connecting the database and the application. You request too many data (or data from a non-optimal query) which takes to much time.
Change your design: do you need to get so many data from your database to your application?
Optimize the queries, set some indexes, etc. so that the queries run quickly.


这篇关于当应用程序连接时发生大数据库错误时在操作完成之前超时或服务器没有响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆