|
Home > Archive > Commerce Server General > June 2006 > User profile changed with web garden
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
User profile changed with web garden
|
|
| Help Please 2006-06-22, 1:21 pm |
| Hello,
I got errors when user login/create new account at web garden more than 1.
Any help would be great !
Environment: Ws2003sp1+CS2002fp1
Situation: When user created a new account and try to checkout or manager
account information just created, sometime user got another profile and
certainly if at checkout process, required fields like email address missing.
Throw the exception.
When I turned off web garden(actually set to 1), no any problem. I searched
all the Commerce Server newsgroups but haven’t found anything related to my
issue.
Any ideas? Thanks in advance.
| |
| Dan Nemesek 2006-06-22, 7:19 pm |
| Hi,
Is there a specific reason or business requirement as to why you are using
web gardens?
As far as why you may be having problems is because the profile cache is
limited to a single w3wp process. When you turn on web gardens than you
have multiple instances of w3wp for the same app pool. You will need to
figure out a way to synchronize the cache amongst multiple processes. In
the Starter Site which should be available in the August timeframe we will
have a sample on how to achieve profile cache coherency for a web farm.
Most likely you could use the same code to synch up the profile cache for
your web garden.
HTH,
Dan
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation.
All rights reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Please reply to the newsgroups only.
| |
| Help Please 2006-06-23, 1:18 pm |
| Thanks a lot. For why using, we have a huge visitors at a short period of
time( 1 hour) for a single site. But at most time the site visitors are at
normal level. So I hope I can get the sample this August timeframe and
applied to webgarden. BTW, is there any references I can get sample
code/clues to implement in web garden or web farm situation?
Frank
"Dan Nemesek" wrote:
> Hi,
>
> Is there a specific reason or business requirement as to why you are using
> web gardens?
> As far as why you may be having problems is because the profile cache is
> limited to a single w3wp process. When you turn on web gardens than you
> have multiple instances of w3wp for the same app pool. You will need to
> figure out a way to synchronize the cache amongst multiple processes. In
> the Starter Site which should be available in the August timeframe we will
> have a sample on how to achieve profile cache coherency for a web farm.
> Most likely you could use the same code to synch up the profile cache for
> your web garden.
>
> HTH,
>
> Dan
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use. © 2002 Microsoft Corporation.
> All rights reserved.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> Please reply to the newsgroups only
| |
| Dan Nemesek 2006-06-23, 7:19 pm |
| Hi Frank,
You should test that a web garden allows you handle more users during your
1 hour burst load. Often times Web Gardens can make performance worse.
The reason why is that switching between threads is a lot less overhead
than switching between processess.
Here is a sample taken from the CS2002 solution site. It's in classic asp
but it should give you an idea of how to achieve this. I will see if I can
get a more updated aspnet sample, but wanted to send out classic asp sample
today to give you an idea of how to achieve this:
Sub EnsureUpToDateUserProfile(ByRef rsUser)
Dim sCookieTimeStamp, sCacheTimeStamp
' Since testing cookie support on every page that
' calls UpdateUserProfile is
' expensive, we assume cookie support unless we detect a ticket in URL.
If m_iTicketLocation <> 1 Then
sCookieTimeStamp = Request.Cookies("UserProfileTimeStamp")
sCacheTimeStamp =
CStr(rsUser.Fields("ProfileSystem.date_last_changed").Value)
If (sCookieTimeStamp = "") Or (sCacheTimeStamp <>
sCookieTimeStamp) Then
Call GetProfileFromDB(rsUser)
' Set/update the cookie timestamp
If rsUser Is Nothing Then
' Delete the cookie for a deleted profile.
Response.Cookies("UserProfileTimeStamp").Expires=Now - 1
Else
Response.Cookies("UserProfileTimeStamp") =
rsUser.Fields("ProfileSystem.date_last_changed").Value
End If
End If
Else
' Get the current user's profile from the database
' if cookies are not supported.
Call GetProfileFromDB(rsUser)
End If
End Sub
HTH,
Dan
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation.
All rights reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Please reply to the newsgroups only.
| |
| Help Please 2006-06-25, 7:32 pm |
| Hi Dan,
I'll try to modify the code to .net version. Thanks.
Back to my original business request for huge number of visitors in a
site for a short period of time, do you have any suggestions other than
increasing hardware resource ? (We have enough memory and after using web
garden,we had better customer experiences except for the problem we
discussed. So web garden may not a solution.)
Frank
"Dan Nemesek" wrote:
> Hi Frank,
>
> You should test that a web garden allows you handle more users during your
> 1 hour burst load. Often times Web Gardens can make performance worse.
> The reason why is that switching between threads is a lot less overhead
> than switching between processess.
>
> Here is a sample taken from the CS2002 solution site. It's in classic asp
> but it should give you an idea of how to achieve this. I will see if I can
> get a more updated aspnet sample, but wanted to send out classic asp sample
> today to give you an idea of how to achieve this:
> Sub EnsureUpToDateUserProfile(ByRef rsUser)
> Dim sCookieTimeStamp, sCacheTimeStamp
>
> ' Since testing cookie support on every page that
> ' calls UpdateUserProfile is
> ' expensive, we assume cookie support unless we detect a ticket in URL.
> If m_iTicketLocation <> 1 Then
> sCookieTimeStamp = Request.Cookies("UserProfileTimeStamp")
> sCacheTimeStamp =
> CStr(rsUser.Fields("ProfileSystem.date_last_changed").Value)
>
> If (sCookieTimeStamp = "") Or (sCacheTimeStamp <>
> sCookieTimeStamp) Then
> Call GetProfileFromDB(rsUser)
>
> ' Set/update the cookie timestamp
> If rsUser Is Nothing Then
> ' Delete the cookie for a deleted profile.
> Response.Cookies("UserProfileTimeStamp").Expires=Now - 1
> Else
> Response.Cookies("UserProfileTimeStamp") =
> rsUser.Fields("ProfileSystem.date_last_changed").Value
> End If
> End If
> Else
> ' Get the current user's profile from the database
> ' if cookies are not supported.
> Call GetProfileFromDB(rsUser)
> End If
> End Sub
>
> HTH,
>
> Dan
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use. © 2002 Microsoft Corporation.
> All rights reserved.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> Please reply to the newsgroups only
| |
| Dan Nemesek 2006-06-26, 7:17 pm |
| Hi,
Since I am not sure what your reqs are or what your application is designed
to do, the only advice I could offer is to make sure you are following the
PAG.
http://msdn.microsoft.com/library/d...-us/dnpag/html/
scalenetchapt06.asp
Chapter 6 is aspnet specific but there are other chapters in that you will
want to read if they are applicable to your app.
HTH,
Dan
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation.
All rights reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Please reply to the newsgroups only.
| |
| Help Please 2006-06-26, 7:17 pm |
| Thanks for your help!
Frank
"Dan Nemesek" wrote:
> Hi,
>
> Since I am not sure what your reqs are or what your application is designed
> to do, the only advice I could offer is to make sure you are following the
> PAG.
> http://msdn.microsoft.com/library/d...-us/dnpag/html/
> scalenetchapt06.asp
>
> Chapter 6 is aspnet specific but there are other chapters in that you will
> want to read if they are applicable to your app.
>
> HTH,
>
> Dan
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use. © 2002 Microsoft Corporation.
> All rights reserved.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> Please reply to the newsgroups only
|
|
|
|
|