I have many users on my web site (20000-60000 per day), which is a download site for mobile files. I have remote access to my server (windows server 2008-R2).
I\'ve
I faced same problem worked on it around 3 days. I noticed as our number of records are not much our senior developer keeps 2 images and Fingerprint in database. When I try to fetch this hex values it taking long time, I calculate average time to execute my procedure its around 38 seconds. The default commandtimeout is 30 seconds so its less than average time required to run my stored procedure. I set my commandtimeout like below
cmd.CommandTimeout = 50
and its working fine but sometimes if your query takes more than 50 seconds it will prompt same error.
try
EXEC SP_CONFIGURE 'remote query timeout', 1800
reconfigure
EXEC sp_configure
EXEC SP_CONFIGURE 'show advanced options', 1
reconfigure
EXEC sp_configure
EXEC SP_CONFIGURE 'remote query timeout', 1800
reconfigure
EXEC sp_configure
then rebuild your index