SQL CommandTimeOut problem, in Virtual Server 2005
ASP Developer Network - Brought to you by Steve Radich and BitShop, Inc. - http://www.bitshop.com

Menu

ASPDeveloper.Net / VirtualServerFAQ.COM

Make sure you go to our home page for:

* Virtual Server 2005 FAQ
* ASP.Net 2.0 Information
* ASP.Net 2.0 Streaming Tutorials
* ASP.Net 2.0 HTML based Tutorials

Made possible by Business Internet Technology Shop (BitShop)



View :  Show duplicate posts
Virtual Server 2005

Recent Virtual Server 2005 posts

Has anybody installed VMWare ESX or ESXi?
Host as member of AD?
AD DC & SQL ALONGSIDE Hyper-V
Strange Hyper-V VM network problem
2008 R2 Hyper-V
Managing VMs on Perimiter networks
Tools to migrate bare metal install to virtual machine?
Installation of KB948515
Hyper-v windows Server 2008 R2
Vista Setup guide including IIS
Portability for Hyper-V
Microsoft Hyper-V Server 2008 R2 Hot Add / Remove Storage - How?
Unix vhd compaction
How to know virtual machine base machine ip
Hyper V Manager without domain?
Internet Explorer Hangs when lunching the admin site
where is my RAID
Hyper-V Server R2 and Raid5 Volume
Pass through disk or ISCSI lun
vseer auto start of vm
Add Solution

Latest Topics

Table Of Contents


Post Reply |  This is Spam! | Mark as Spam

SQL CommandTimeOut problem

Source: microsoft.public.virtualserver
Sent: 09/23/2009
From: "microsoft.public.virtualisation" <(email address - cut out)>
Message:

Hi,

We recently Virtualised our servers. Basically we had two physical
servers and now we have two vertual servers.

We run a couple of Web applications on the VM server. We had
everything running fine for a while - until we got a timeout problem
with a search function. Basically a page doing a search call to SQL
server and that took more than the default SQL Command Execution
timeout which is set to 30 secs my MS.


To resolve that problem, we set CommandTimeout property of the
SQLCommand object as well as the
SQLConnection object - to 0 - this makes the timeout to be unlimited.


The code snippet below shows what we did:
Note: that the CommandTimeout is set at both the SQLConnection and
SQLCommand levels !!

>>> code snippet follows ...

aConnection = New SqlConnection
("Database=myDB;Trusted_Connection=True;Connection Timeout = 0;")

mCommand = New SqlCommand(strStoredProcedureName, aConnection)
mCommand.CommandType = CommandType.StoredProcedure
mCommand.CommandTimeout = 0

<<<...

The question is: this stuffed up the Virtual Server memory. The
connection seems to consume the memory
really big time. From 4GB RAM down to 1GB RAM left in no time whenever
we run our application making
use of the above SQL Connection Statements.

We are not sure what caused the problem - but we decided to roll-back
to our old code and
remove the above SQL CommandTimeout Statements and left it to the
default 30secs.

This seemed to run the application and RAM consumption as normal and
happy.degradation which is of course

We suspected the above CommandTimeout code snippet to have the caused
the problem.

Any changes to any other code did not cause any memory problems.

==>> Also - the problem was apparent only in the Virtual Servers
network setup.
===> That is the application could run fine when hoseted on a local
IIS (personal web server)
===> making calls to the same SQL server ...


Will someone please tell me what exactly happened.

Can the CommandTimeout setting affect the RAM so much?

Please also CC me your reply to => (email address - cut out)

Thanks.

Billion.



Post Reply |  This is Spam! | Mark as Spam

Related Messages


Post Reply |  This is Spam! | Mark as Spam


Table Of Contents



Other groups

 
Virtual PC (Mac)(3592) Virtual PC(12844) Virtual PC (French)(496)
Virtual Server 2005(6245)
Search
in:
Our Sponsors
Virtual Server 2005 Info Here!
http://www.aspdeveloper.net
Virtual Server 2005 Info Here!
http://www.aspdeveloper.net
Virtual Server 2005 Info Here!
http://www.aspdeveloper.net
Virtual Server 2005 Info Here!
http://www.aspdeveloper.net
Virtual Server 2005 Info Here!
http://www.aspdeveloper.net
rss Wiki rss Blogs rss Articles rss Image galleries rss File galleries rss Forums rss Maps rss Directories
ASP Developer Network (since 1996) - Brought to you by Steve Radich and BitShop, Inc. - http://www.bitshop.com
Copyright © 1997-2005 by BitShop, Inc. All Rights Reserved.
No content may be reproduced in any form without written permission from BitShop, Inc.
We will be honored to assist with reproduction rights on our material if you contact us.
We also can provide print articles for your magazine, private training seminars at your site, and conference presentations.

Thank you for visiting. Please bookmark our site if you found it useful!
If you wish to make a donation it will help further the development of these free resources: