homepage Welcome to WebmasterWorld Guest from 54.204.64.152
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
Home / Forums Index / Hardware and OS Related Technologies / Webmaster Hardware
Forum Library, Charter, Moderator: open

Webmaster Hardware Forum

    
ODBC Connections
at least i think...
Scally_Ally




msg:1566865
 12:24 pm on Nov 22, 2005 (gmt 0)

Hi All,

I am in charge of a server remotely using the remote desktop.

it seems that when the server gets a medium to large amount of traffic the connections to the database seem to break. I am using ODBC to connect to the database and by way of trial and error i have narrowed down that it must be this as other parts of the site that do not connect to the database via ODBC work alright still.

The error i get is an unspecified error at the first site of any database activity.

My question is this, is there any way to optimise the ODBC connections to deal a larger volume of traffic?

Thanks

Ally

 

mattglet




msg:1566866
 12:47 am on Nov 23, 2005 (gmt 0)

This isn't really a hardware question, more of a development question.

When you open a connection to a database in your code, you should be closing it when you are done with it. This practice will ensure that your connection pool will contain only the connections needed to operate your site, and consume only the needed resources as well.

Scally_Ally




msg:1566867
 10:38 am on Nov 23, 2005 (gmt 0)

Thats the wierd thing...

I have checked through all of my code to make sure that i had closed all database connections and sessions that are not in use at that particular time.

the error i get is

provider error '80004005'
unspecified error

this seems a little vague to me, it is a new iis server i am using but when the site was on the old server it worked perfectly well.

I am thinking that maybe it some kind of setting that maybe i have overlooked.

Thanks

mattglet




msg:1566868
 1:18 pm on Nov 23, 2005 (gmt 0)

Can you post the line of code causing the error?

Scally_Ally




msg:1566869
 9:32 am on Nov 24, 2005 (gmt 0)

conn.open "DSN=myDatabase;"

this is where the page falls over and the server goes wrong, on the page this is the first place any database work is started.

when i get the error report from the server it says that the connection had timed out, so i will assume that that means that it couldnt create a connection within the alloted time which is 30 seconds (at least i think).

In order to over ride this problem i have to restart the server.

Im really lost with this, it seems to happen about once every 2 days or so.

Thanks

mattur




msg:1566870
 12:22 pm on Nov 25, 2005 (gmt 0)

Assuming you're using ASP, one way to optimise ODBC connections is to not use them(!).

ASP uses ADO which uses OLEDB as the data API. When you use an ODBC connection in ASP you're actually adding an extra layer to the data stack - the OLEDB to ODBC conversion.

So using ODBC in ASP is like:
ASP -> ADO - > OLEDB -> ODBC -> database

You can optimise this by using an OLEDB connection instead:
ASP -> ADO - > OLEDB -> database

This is especially important when using Access as the database (are you using Access?)

For more information google for oledb connection strings.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Webmaster Hardware
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved