Chronic database connection failure
Chronic database connection failure
am 25.09.2006 22:01:14 von neveroncontact
My web server is running Win2k3 server with IIS 6.0 and all service
packs installed. the database is on a Windows 2000 Adv. Server machine
running SQL 2000 and all updates installed.
Everything works properly but every 2-6 hours, the web server will
begin to give database connection errors and my entire site will stop
working. If I restart IIS it does not fix the problem, but rebooting
the machine DOES fix the problem and the site works properly. This is
creating a lot of downtime for us and is pretty frustrating.
We had the site running previously on a Windows 200 Adv Server web
server with none of these issues.
All IIS settings for bandwidth and session/connection limitations are
set at "unlimited."
I am at a loss of what the problem could be. It does not appear to be
a memory leak since the IIS memory usage (w3wp.exe) never gets much
about 100 or 120 megs before the system crashes and is sometimes as low
as 80 megs.
Any thoughts or ideas on how to troubleshoot or fix this?
Thanks!!
Re: Chronic database connection failure
am 25.09.2006 22:25:26 von reb01501
neveroncontact@hotmail.com wrote:
> My web server is running Win2k3 server with IIS 6.0 and all service
> packs installed. the database is on a Windows 2000 Adv. Server
> machine running SQL 2000 and all updates installed.
>
> Everything works properly but every 2-6 hours, the web server will
> begin to give database connection errors and my entire site will stop
> working. If I restart IIS it does not fix the problem, but rebooting
> the machine DOES fix the problem and the site works properly. This is
> creating a lot of downtime for us and is pretty frustrating.
>
> We had the site running previously on a Windows 200 Adv Server web
> server with none of these issues.
>
> All IIS settings for bandwidth and session/connection limitations are
> set at "unlimited."
>
> I am at a loss of what the problem could be. It does not appear to be
> a memory leak since the IIS memory usage (w3wp.exe) never gets much
> about 100 or 120 megs before the system crashes and is sometimes as
> low as 80 megs.
>
> Any thoughts or ideas on how to troubleshoot or fix this?
Could this apply?
http://support.microsoft.com/?kbid=328476
The article mentions problems when pooling is deliberately disabled, but
poor coding practices can also lead to pooling being disabled:
http://support.microsoft.com/?kbid=271128
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: Chronic database connection failure
am 25.09.2006 23:32:46 von neveroncontact
You calling me a crappy coder? You wanna step outside?
Thanks that was a likely guess. I did some research on enabling pooling
and as far as I can tell it is enabled and my CPTIMEOUT for SQL is set
to 60 seconds. Your article mentions being able to manually configure
the number of sockets enabled but doesn't say how. It says the default
is 4,000 and when I run the netstat command it lists about 300 sockets
in the "TIMEWAIT" status. I'm still trying to figure out how to find
what ours is currently set at.
Any other suggestions you might have if this doesn't work out? What
about our coding might cause this?
Thanks a lot for your help man. Very much appreciated.
Re: Chronic database connection failure
am 25.09.2006 23:34:18 von neveroncontact
Oops sorry. Saw your second link and am reading through that now.
Re: Chronic database connection failure
am 25.09.2006 23:37:39 von neveroncontact
OK that seems very apropos. We definitely run lots and lots of new
execute commands on the same session, but we never had this problem
with Windows 2000 and whatever version of IIS we were running on that
(not 6.0). Is there something different about IIS 6.0 that is creating
this issue?
Re: Chronic database connection failure
am 26.09.2006 01:44:52 von reb01501
neveroncontact@hotmail.com wrote:
> OK that seems very apropos. We definitely run lots and lots of new
> execute commands on the same session, but we never had this problem
> with Windows 2000 and whatever version of IIS we were running on that
> (not 6.0). Is there something different about IIS 6.0 that is
> creating this issue?
None that I'm aware of.
Do you use explicit Connection objects? Failure to use explicit Connection
objects can result in the use of implicit connections. I'm talking about the
practice of using a connection string when opening recordsets or executing
Command objects, instead of creating and opening an explicit Connection and
using that object to open recordsets and run commands.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Re: Chronic database connection failure
am 26.09.2006 04:47:22 von neveroncontact
OK I jacked our sockets from 5,000 to 60,000 and it didn't help. I
just came back to find:
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.
We do the following:
Set DB=Server.CreateObject("ADODB.Connection")
DSN = "Provider=SQLOLEDB;uid=XXXXXXXXXX;pwd=YYYYYYY;Data
Source=ZZZZZZ;database=AAAAAAAA;NETWORK=DBMSSOCN;"
DB.Open(DSN)
We then open record sets as such:
SQL = "select blah from blah"
Set RS = Db.Execute(SQL)
Blah = RS("Blah")
We then sometimes do an RS.Close but sometimes not. There is quite a
bit of sloppy old code from years past where we do queries inside
RS.MoveNext loops and the like, or we leave recordsets open and work
through them in other ways. We realize now that is very inefficient
and our more recent code from the last couple years has steered clear
of those practices in favor of arrays, but the code still exists.
That being said, while there may have been some unnecessary server load
with that type of code, we never had these problems and could easily
walk away from the site for weeks at a time with no issues. I can't
leave for more than 2-5 hours now without getting the error described
above.
I appreciate you taking the time to help me out here, Bob. you are
very generous to do so.
Re: Chronic database connection failure
am 26.09.2006 05:16:08 von neveroncontact
OK now a web server reboot isn't even helping. Just rebooted twice and
its giving me the error right from the get-go. The other 15 web server
reboots have fixed it these past days, but not this time. I then
rebooted both my database servers and the web server again, and that
rectified the problem for the time being.
Help!
Re: Chronic database connection failure
am 26.09.2006 05:34:07 von reb01501
neveroncontact@hotmail.com wrote:
> OK now a web server reboot isn't even helping. Just rebooted twice
> and its giving me the error right from the get-go. The other 15 web
> server reboots have fixed it these past days, but not this time. I
> then rebooted both my database servers and the web server again, and
> that rectified the problem for the time being.
>
> Help!
Now I'm more inclined to blame hardware. Get your network techs to check
things out. Perhaps a bad network card ...
There's a KB article about troubleshooting connection failures from IIS/ASP.
You should attempt to find it via google
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Re: Chronic database connection failure
am 26.09.2006 05:55:33 von neveroncontact
We did recently just put gigabit cards into several of these machines.
I am not familiar with them and don't know potential issues that they
may have. We don't have network techs, its just 2 guys here and we are
our own show. I will do the search that you suggested.
Re: Chronic database connection failure
am 26.09.2006 17:11:02 von Jason Simmons
go to the properties of the card and change the speed from AUTO to the speed
of the network the card is attached to (100MB FULL) for example.
"Wayward Son" wrote in message
news:1159242933.316252.309290@b28g2000cwb.googlegroups.com.. .
> We did recently just put gigabit cards into several of these machines.
> I am not familiar with them and don't know potential issues that they
> may have. We don't have network techs, its just 2 guys here and we are
> our own show. I will do the search that you suggested.
>