Web Hosting Talk







View Full Version : Is this me or is this the host?


TheGAME1264
12-12-2002, 02:27 PM
The following question is for anyone who knows ASP. I have an SQL database on a host and I use the following lines to open a connection to the database:

set Connect = Server.CreateObject("ADODB.Connection")
Connect_String = "PROVIDER=SQLOLEDB;DataSource=(source);Initial Catalog=(Initial catalog);USER ID=(user ID);PASSWORD=(password);"
Connect.Open Connect_String

This works about 99% of the time, but every so often the script will time out when opening the connection string. I can refresh the page and everything will be fine, but as the site this is on is starting to gain traffic, this issue is becoming more and more chronic. I've also noticed that some pages time out even before any code is executed (Line 0). Is this me or is this the web host for the site?

Any input would be greatly appreciated. Thanks.

ATST
12-12-2002, 04:50 PM
First, I am not a ASP person, but I can give you a few hints. If that works 99% of the time, it is not the code.
Does this happen mostly during peak internet usage times? It may be that your host has throttled the connection time, and during heavy usage of the shared server, the time to connect is increased, therefore, it times out. This may seem unfair, but in a shared server invironment, this throttling does help all the users on that server. Of course so would limiting the number of accounts on the server.

TheGAME1264
12-12-2002, 05:10 PM
Not necessarily during peak usage times, but at random points throughout the day. It used to be once every two or three days about 3 weeks after the site launched but it's been getting worse and worse. However, what you're saying does make sense to me. I just wasn't sure if I should approach my client with it, since he picked the host and not me. And I agree with the limiting the number of accounts idea (I wish more hosts would cap the number of sites on a server either at a dollar range/figure based on cost plus a reasonable percentage--they've got to meke their points, and I can respect that---or at a reasonable number of users.)

Thanks!

IGobyTerry
12-12-2002, 05:18 PM
Try to see if your host will put you on a site that has less accounts on it. Doing that the timeouts should be get a little better as there won't be as many sites attempting to make connections.

mccuem
12-12-2002, 05:23 PM
The connection failing is just a symptom, not necessarily the problem.

It could be the code, how is it handling it's connections? I'm no ASP pro either, but are you opening a bunch of connections and keeping them open? Even if it's like MySQL where the connection closes at the termination of a script, your clients script could be hitting a condition "every so often" that causes it to open yet another connection that it can't open... or it will have more connections open than the host allows.

Do you know how many connections a user is allowed on the host?

TheGAME1264
12-12-2002, 06:46 PM
I thought of that too but the connection opens once at the start and closes at the end, and it's not reopened or opened again at any point. The simultaneous connections is a thought though.