IT Knowledge Support Centre
Timeout expired 
Thursday, November 12, 2009, 05:08 PM - SQL
Posted by Administrator
The timeout period elapsed prior to completion of the operation or the server is not responding.

This error occured very often in Asp.net Application. There are many solutions to resolve this problem. Lets Try these solutions one by one.
Solutions 1
Try adding a Connect Timeout in the web.config
<add key="DBConnection" value="server=LocalHost;uid=sa;pwd=;database=DataBaseName;Connect Timeout=200; pooling='true'; Max Pool Size=200"/>


Solutions 2
The solution is simple, change the CommandTimeout property of your SqlCommand object.
The Connect Timeout attribute of a connection string determines how long a SqlConnection Object runs before it stops attempting to connect to a server.

Sample Code

Dim myCommand As New SqlCommand(sql, myConnection, myTrans)
myCommand.CommandType = CommandType.StoredProcedure
myCommand.CommandTimeout = 0

When 0 is for no limit.
Solution 3
The "Timeout expired" error commonly occurs when an instance of the SQL Server Database Engine is not running, when the server name was typed incorrectly, or when there are network problems or firewalls.

Following are the cause and their solutions
A- Server name was typed incorrectly.
Try again with the correct server name.
B- The SQL Server service on the server is not running.
Start the instance of SQL Server Database Engine.
C- The TCP/IP port for the Database Engine instance is blocked by a firewall.
Configure the firewall to permit access to the Database Engine.
D- Database Engine is not listening on port 1433 because it has been changed, or because it is not the default instance, and the SQL Server Browser service is not running.
Either start the SQL Server Browser service, or connect specifying the TCP/IP port number.
F- The SQL Server Browser service is running but UDP port 1434 is blocked by a firewall.
Either configure the firewall to permit access to the UPD port 1434 on the server, or connect specifying the TCP/IP port number.
G- The client and server are not configured to use the same network protocol.
Using SQL Server Configuration Manager, confirm that both the server and the client computers have at least one enabled protocol in common.
H- The network cannot resolve the server name to an IP address. This can be tested using the PING program.
Fix the computer name resolution problem on your network or connect using the IP address of the server. This is not a SQL Server problem. For assistance, see your Windows documentation or your network administrator.
I- The network cannot connect using the IP address. This can be tested using the PING program.
Fix the TCP/IP problem on your network. This is not a SQL Server problem. For assistance, see your Windows documentation or your network administrator.

1 comment ( 13 views )   |  permalink   |   ( 3 / 371 )
Scaling Up & Scaling Out  
Tuesday, October 13, 2009, 10:07 PM - SQL
Posted by Administrator
Scaling Up Versus Scaling Out Database Server?

Scaling Up Vs. Scaling Out. When web application traffic grows there are two ways to handle it. Either Scaling Up or Scale out, what is it specially in case of Database server?

The most common approach to scaling applications is to scale them up. In essence, scaling-up simply means to keep increasing the resources (hardware) available on the server, allowing it to handle more load and user requests. The reason that this approach is so common is because it requires no change to the actual application and all of the data is in one place, which certainly helps reduce complexity and maintenance.

The second and more complex approach is scaling-out. The basic idea is to partition data across several database servers and therefore splitting the load of the application across multiple servers.

While scaling out web servers can be done quite easily, properly scaling out database servers is far more challenging.


add comment ( 1 view )   |  permalink   |   ( 3.1 / 309 )

| 1 |