Showing posts with label runs. Show all posts
Showing posts with label runs. Show all posts

Tuesday, March 20, 2012

ASP & SQL Server on separate machines causes performance degragation

I am currently running a windows 2000 machine with asp, sql server,
mail server, ftp server etc all on the same box.

The site runs several hundred ecommerce stores. Recently the
processor utilization has been spiking and I have decided to get
another server and use sql server on one and asp on the other.

So now I have a new windows 2003 server that I have setup all of the
asp code on. Problem is that when I run the asp code from the new
windows 2003 server it is extremely slow compared to the code running
on the old windows 2000 server which is where the sql server database
is also located.

From everything I have read the best way to optimize your site is to
use 2 separate servers one for iis/asp and one for sql server.

Am I doing something wrong here or is this normal??

Could this possibly be just because the old server is still serving
many requests and is pushing the requests from the new server to the
back of the line?

Does anyone have any ideas?

The syntax I am using to open the connection string is:

db_ConnectionString = "Driver=" & db_Driver & ";Server=" & db_Server &
";UID=" & db_UIN & ";PWD=" & db_pwd & ";Database=" & db_Database & ";"

conn_store.Open db_ConnectionString
where db_server is the ip address of the windows 2000 server

Is there a better way to do it across a network??

Any help or ideas would be much appreciated.Melanie:

>>From everything I have read the best way to optimize your site is to
use 2 separate servers one for iis/asp and one for sql server.

Adding a new layer to an environment will rarely gain you performance.
There is an extra network hop that the server has to make to retrieve
the data.
Having said that, you will most likely gain scalability which is
different from performance.

You might want to have some form of high speed or dedicated network
connection in between your web server and sql server. Although you
should first try to determine if the connection in between the servers
is really the problem here.

FYI, your server configuration is widely used. Unless you are
retrieving a very large amount of data, you shouldn't be able to tell
that BIG of a difference.

Hope that helps.

BZ

mblack@.deltad.com (Melanie Black) wrote in message news:<3efc718d.0310291500.661bbaba@.posting.google.com>...
> I am currently running a windows 2000 machine with asp, sql server,
> mail server, ftp server etc all on the same box.
> The site runs several hundred ecommerce stores. Recently the
> processor utilization has been spiking and I have decided to get
> another server and use sql server on one and asp on the other.
> So now I have a new windows 2003 server that I have setup all of the
> asp code on. Problem is that when I run the asp code from the new
> windows 2003 server it is extremely slow compared to the code running
> on the old windows 2000 server which is where the sql server database
> is also located.
> From everything I have read the best way to optimize your site is to
> use 2 separate servers one for iis/asp and one for sql server.
> Am I doing something wrong here or is this normal??
> Could this possibly be just because the old server is still serving
> many requests and is pushing the requests from the new server to the
> back of the line?
> Does anyone have any ideas?
> The syntax I am using to open the connection string is:
> db_ConnectionString = "Driver=" & db_Driver & ";Server=" & db_Server &
> ";UID=" & db_UIN & ";PWD=" & db_pwd & ";Database=" & db_Database & ";"
> conn_store.Open db_ConnectionString
> where db_server is the ip address of the windows 2000 server
> Is there a better way to do it across a network??
> Any help or ideas would be much appreciated.|||On 29 Oct 2003 15:00:06 -0800, Melanie Black wrote:

> I am currently running a windows 2000 machine with asp, sql server,
> mail server, ftp server etc all on the same box.
> The site runs several hundred ecommerce stores. Recently the
> processor utilization has been spiking and I have decided to get
> another server and use sql server on one and asp on the other.
> So now I have a new windows 2003 server that I have setup all of the
> asp code on. Problem is that when I run the asp code from the new
> windows 2003 server it is extremely slow compared to the code running
> on the old windows 2000 server which is where the sql server database
> is also located.

Not a solution but:
Wouldn't it have been easier to move just SQL Server to Windows 2003 and
keep the ASP sites on the Windows 2000 machine?

--
Karim
Recommended host: http://www.cheapesthosting.com - Affordable hosting since
1998|||Actually that was originally the idea but the windows 2003 server turned
out to be windows 2003 web edition which does not support sql server.

Also I was able to figure out that by changing the database connection
type the performance increased signifigantly. I can still notice a bit
of a slowdown but not nearly what I saw before.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!sql

Sunday, March 11, 2012

AS2005. strange Error in MDX.

Hi AS Fathers,

If AS runs under account with no english locale (for example 'de' or 'ru') , the following query

select {[Product].[Dealer Price].&[1.374]} on 0 from [Adventure Works]

returns nothing, but this one

select {[Product].[Dealer Price].&[1,374]} on 0 from [Adventure Works]

returns a member with unique name [Product].[Dealer Price].&[1.374]

Under such circumstances it isn't possible to select element from member list in oder to set filter etc.

there is some thing strange in forum. 1 hour ago here was a message from Mosha. Where is it?

Monday, February 13, 2012

ArgumentNullException thrown after second connection

Hi,

Our application has two parts: one is Windows application and the other

one is Windows service. The service runs under Local system accont. We

use third party application to log into database which uses instance of

SQL Server 2005 Express . We use same methods for logging for Windows

application and for Windows service. Both, application and the service

are compiled with .Net framework 2.0 and VS 2005 (C#).

The application always logs into the database succesfuly. The problem

is with the service. The code for the service works like this: first

login into database to retrieve some data, after that log off and

disconnect, and after that immediately tries to login again using the

the same credentials. The first login is always succesful, but the

second one fails with error message:

Type:System.ArgumentNullException

Message:Value cannot be null.

Parameter name: Value is

null.

If we set the Service to run under User windows

account - everything works fine. Does anyone have similar

problems? What can be the problem here? Can anyone help me?

Thanks.

Could you provide the code that is causing the problem and identify the line that thows the exception?

Mike

|||The code is below. The same code works fine for the windows application

and when service connects for the first time. Database path, user name

and password are the same. The code crashes when Windows service tries

to connect for the second time (after LogOff) on line framework.LogOn( sDatabaseFullPath, sUserName, sUserPassword ) and it throws Exception:

Type:System.ArgumentNullException

Message:Value cannot be null.

Parameter name: Value is

null.

Parameters are not null, not even empty string. They contain valid string values (I checked with the debugger).

Framework is namespace from the third party application SDK. I

contacted this third party support also, but they didn't try to help me.

Please note that this code was working fine with .Net framework 1.1, VS 2003 and SQL Server 2000 DE.

public override void LogOn( DBCredentials dbCredentials

)

{

string sDatabaseFullPath =

dbCredentials.DBFileNameFullPath;

string sUserName =

dbCredentials.UserName;

string sUserPassword =

dbCredentials.Password;

try

{

if( IsConnectionLive

)

framework.LogOff();

framework.LogOn(sDatabaseFullPath, sUserName,

sUserPassword);

}

catch( InvalidLogonException

ile )

{

throw new InvalidLogonException(

ile.Message, dbCredentials);

}

catch( ThreadAbortException

ex )

{

throw

ex;

}

catch( LockDatabaseException lde )

{

throw new LockDatabaseException(

lde.Message );

}

catch( Exception

ex)

{

throw new Exception(

ex.Message );

}

}

|||

I don't know anything about this framework namespace or what happens when you call framework.LogOn so it's tough to give you any advice. If you can look at the code in framework, that would be a place to start, if you can't, you'll likely need to push back on the vendor that sold you this framework as this seems to be a problem with their code. There is likely something within framework that is causing the ArgumentNullException and it is just bubbling up.

As a troubleshooting measure, you could try creating your own LogOff and LogOn procedures and use them in your service. You need to try and isolate the "black box" and ensure that SQL Server is working correctly and that the action you are trying to perform is working without the call to framework.

Mike

|||Thanks.