473,401 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Live multi-user debugging? Help!

I have an asp.net app running off of a W2003 server. It's being
written in VS2003. I've encountered a problem where a database record
is being updated with the wrong value intermittently. So I debug the
page.

I step through the code and the value Session("PersonID") changes
right before my eyes for no apprent reason. Now, this is where it
gets really weird. I'm attached to the process on the web server and
debugging. I give up and close the web browser. Fine.

I'm yakking away to a co-worker about the problem the nsuddenly out of
nowhere, VS stops at a breakpoint. ??? I closed the browser and
haven't clicked on anything. So I examine the personID. It's 2259.
Not the one I was working with. So I hit continue. A moment later,
it stops at the same breakpoint by itself and the personID is now
3278. Continue. Moments later...

It's picking up live people using the site! How can I debug this
application if live people are constantly changing the state of the
debugging session? This is why it's writing the wrong values, the
session values seem to be changing at will based on who's logged into
the site.

Umm.. help? :) Is this by design? Is it an internal problem with the
web server or VS or....

Any help much appreciated, thanks!

Jul 4 '06 #1
6 1378
Tom wilson wrote:
I have an asp.net app running off of a W2003 server. It's being
written in VS2003. I've encountered a problem where a database record
is being updated with the wrong value intermittently. So I debug the
page.

I step through the code and the value Session("PersonID") changes
right before my eyes for no apprent reason.
That's a symptom of having "maximum number of worker processes" for an
application pool being more than 1. To have more than 1, you have to use
out-of-process session state storage. Useful search keyword: aspnet_state.

Andrew
Jul 4 '06 #2
Yes, that sounds like it. But I'm having much trouble finding any
information on it. Searches for aspnet_state return hundreds of pages
telling me what it does (from the 'is it a worm?' aspect). I searched
for "Maximum number of worker processes". Google returns 3 hits.
There's an excellent page out there that tells me how to change the
values but not WHAT I should chnage those values to. Like:

"DWORD value set to the number of requests after which a new worker
process will be launched to take the place of the current one. The
default is infinite, a keyword indicating that the process should not
be restarted. "

Do I change this? What do I change it to? What about the other
values? Do I change those and to what?

Does anyone know of any intelligible information on the topic?

Thanks for the reply!
On Tue, 4 Jul 2006 17:32:39 +0100, "Andrew Morton"
<ak*@in-press.co.uk.invalidwrote:
>Tom wilson wrote:
>I have an asp.net app running off of a W2003 server. It's being
written in VS2003. I've encountered a problem where a database record
is being updated with the wrong value intermittently. So I debug the
page.

I step through the code and the value Session("PersonID") changes
right before my eyes for no apprent reason.

That's a symptom of having "maximum number of worker processes" for an
application pool being more than 1. To have more than 1, you have to use
out-of-process session state storage. Useful search keyword: aspnet_state.

Andrew
Jul 4 '06 #3
Tom wilson wrote:
Yes, that sounds like it. But I'm having much trouble finding any
information on it. Searches for aspnet_state return hundreds of pages
telling me what it does (from the 'is it a worm?' aspect). I searched
for "Maximum number of worker processes". Google returns 3 hits.
There's an excellent page out there that tells me how to change the
values but not WHAT I should chnage those values to. Like:
<snip>
Do I change this? What do I change it to? What about the other
values? Do I change those and to what?
/Do/ you have "Maximum number of worker processes" set to more than one? You
might get answers from people more knowledgable in this are than me (not
difficult) in microsoft.public.inetserver.iis, but here's what I think the
settings do:
-------------------------
Recycling:-
Recycle worker processes: tear it down and start again just in case it's
gone messy somewhere. IME, in-process session-state gets destroyed when it
recycles a worker process.

Memory recycling: well, if it comes to that, either add more RAM or find the
memory leak. (Talking about memory, if the site seems sluggish, have a look
under the performance tab in Task Manager. If the total commit charge is
greater than the total physical memory then it wants more RAM.)
Performance:-
Idle timeout: shut it down after a while so that the next request after that
takes longer as it has to wake up again. This might also interfere with
session state (if so, look out for the session state timeout for the web
site - the setting you get to by right-clicking the web site, then
Properties->Home Directory tab->Configuration...->Options tab).
Request queue limit: reduce DOS attack effect.
CPU monitoring: what to do if it goes mad for too long.

Web garden: if one worker process gets stuck (see Recycling above), you can
have another one going so that people can still use the web site. Of course,
I should have put timeouts around all my requests to other services so it
didn't get stuck in the first place..
Health:-
Dunno, but if it ain't broke, don't fix it.
Identity:-
You might want to run the service under a different account from the
default, like you do with SQL Server etc. I've never tried that.
----------------------------

This article tells it all w.r.t. session state:-
http://msdn2.microsoft.com/en-us/library/ms178586.aspx

Oh - no it doesn't. It doesn't mention that with out-of-process
session-state you must make sure that everything you store in a Session()
variable must be <Serializable()as in
<Serializable()Public Class basketCentral
Implements IDisposable ' keeps it happy
......

And another thing: before wiggling all the bits, manually back up the config
by right-clicking on the computer in IIS Manager and going through All
Tasks..., and then back it up again when you've got it working
satisfactorily. If you have to re-install IIS, only the manually backed up
configs survive.

HTH

Andrew
Jul 5 '06 #4
Tom wilson wrote:
I'm yakking away to a co-worker about the problem the nsuddenly out of
nowhere, VS stops at a breakpoint. ??? I closed the browser and
haven't clicked on anything. So I examine the personID. It's 2259.
Not the one I was working with. So I hit continue. A moment later,
it stops at the same breakpoint by itself and the personID is now
3278. Continue. Moments later...
Sounds to me like a Threading issue, with VS stopping on the breakpoints
in your code as each /executing Thread/ passes through them.
It's picking up live people using the site!
"Fun", isn't it?
How can I debug this application if live people are constantly
changing the state of the debugging session?
And, IMHO, this is just one reason why I would never recommend trying to
"Debug" a live application /even if/ you have some way of limiting
access to only those individuals that need to be in there at any point
in time!

However, wouldn't each Client be accessing their /own/ Session data?
Certainly if there's /any/ possibility of one person seeing data held in
another person's Session information then I, for one, will /not/ be
moving to ASP.Net /any/ time soon.
This is why it's writing the wrong values, the session values seem
to be changing at will based on who's logged into the site.
Well, /if/ we're talking about the Session object, that would be the
case, wouldn't it?

HTH,
Phill W.
Jul 5 '06 #5
Thanks, I'm building a new web server for these domains so I'll apply
thisi n the new construction.
On Wed, 5 Jul 2006 11:17:14 +0100, "Andrew Morton"
<ak*@in-press.co.uk.invalidwrote:
>Tom wilson wrote:
>Yes, that sounds like it. But I'm having much trouble finding any
information on it. Searches for aspnet_state return hundreds of pages
telling me what it does (from the 'is it a worm?' aspect). I searched
for "Maximum number of worker processes". Google returns 3 hits.
There's an excellent page out there that tells me how to change the
values but not WHAT I should chnage those values to. Like:
<snip>
>Do I change this? What do I change it to? What about the other
values? Do I change those and to what?

/Do/ you have "Maximum number of worker processes" set to more than one? You
might get answers from people more knowledgable in this are than me (not
difficult) in microsoft.public.inetserver.iis, but here's what I think the
settings do:
-------------------------
Recycling:-
Recycle worker processes: tear it down and start again just in case it's
gone messy somewhere. IME, in-process session-state gets destroyed when it
recycles a worker process.

Memory recycling: well, if it comes to that, either add more RAM or find the
memory leak. (Talking about memory, if the site seems sluggish, have a look
under the performance tab in Task Manager. If the total commit charge is
greater than the total physical memory then it wants more RAM.)
Performance:-
Idle timeout: shut it down after a while so that the next request after that
takes longer as it has to wake up again. This might also interfere with
session state (if so, look out for the session state timeout for the web
site - the setting you get to by right-clicking the web site, then
Properties->Home Directory tab->Configuration...->Options tab).
Request queue limit: reduce DOS attack effect.
CPU monitoring: what to do if it goes mad for too long.

Web garden: if one worker process gets stuck (see Recycling above), you can
have another one going so that people can still use the web site. Of course,
I should have put timeouts around all my requests to other services so it
didn't get stuck in the first place..
Health:-
Dunno, but if it ain't broke, don't fix it.
Identity:-
You might want to run the service under a different account from the
default, like you do with SQL Server etc. I've never tried that.
----------------------------

This article tells it all w.r.t. session state:-
http://msdn2.microsoft.com/en-us/library/ms178586.aspx

Oh - no it doesn't. It doesn't mention that with out-of-process
session-state you must make sure that everything you store in a Session()
variable must be <Serializable()as in
<Serializable()Public Class basketCentral
Implements IDisposable ' keeps it happy
......

And another thing: before wiggling all the bits, manually back up the config
by right-clicking on the computer in IIS Manager and going through All
Tasks..., and then back it up again when you've got it working
satisfactorily. If you have to re-install IIS, only the manually backed up
configs survive.

HTH

Andrew
Jul 10 '06 #6
Weird, the application in question hosts 2 events. The first event
involves about 50 people and works flawlessly. The second event
involves over 2500 people and there are errors throughout the
database. Same code, same site. I'm setting up a new production
server and a seperate development server and I'll keep this in mind.

Thanks!

On Wed, 05 Jul 2006 12:59:00 +0100, "Phill W."
<p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-kwrote:
>Tom wilson wrote:
>I'm yakking away to a co-worker about the problem the nsuddenly out of
nowhere, VS stops at a breakpoint. ??? I closed the browser and
haven't clicked on anything. So I examine the personID. It's 2259.
Not the one I was working with. So I hit continue. A moment later,
it stops at the same breakpoint by itself and the personID is now
3278. Continue. Moments later...

Sounds to me like a Threading issue, with VS stopping on the breakpoints
in your code as each /executing Thread/ passes through them.
>It's picking up live people using the site!

"Fun", isn't it?
>How can I debug this application if live people are constantly
changing the state of the debugging session?

And, IMHO, this is just one reason why I would never recommend trying to
"Debug" a live application /even if/ you have some way of limiting
access to only those individuals that need to be in there at any point
in time!

However, wouldn't each Client be accessing their /own/ Session data?
Certainly if there's /any/ possibility of one person seeing data held in
another person's Session information then I, for one, will /not/ be
moving to ASP.Net /any/ time soon.
>This is why it's writing the wrong values, the session values seem
to be changing at will based on who's logged into the site.

Well, /if/ we're talking about the Session object, that would be the
case, wouldn't it?

HTH,
Phill W.
Jul 10 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Dave Smithz | last post by:
Hi There, I have taken over someone else's PHP code and am quite new to PHP. I made some changes and have implemented them to a live environment fine so far. However, I now want to setup a...
12
by: * ProteanThread * | last post by:
but depends upon the clique: ...
0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
6
by: cody | last post by:
What are multi file assemblies good for? What are the advantages of using multiple assemblies (A.DLL+B.DLL) vs. a single multi file assembly (A.DLL+A.NETMODULE)?
0
by: John Bailo | last post by:
http://www.onlamp.com/pub/wlg/7468 "Mono Live was released on May 24, 2005. Although there are several Live Linux CDs with Mono, they are all based on Knoppix and use KDE as the default Linux...
2
by: Nils Hedström | last post by:
I have a ASP.NET 1.1 project that I want to be able to deploy on my web-servers while they have real traffic (40 requests/second). When I copy the projects assembly in the bin-directory of the...
0
by: Julian Snitow | last post by:
Here is a more visual example of the technique presented in Logan Koester's article, "Live Coding in Python" (http://www.logankoester.com/mt/2006/07/live_coding_with_python_1.html). It's very...
0
by: Sabri.Pllana | last post by:
We apologize if you receive multiple copies of this call for papers. *********************************************************************** 2008 International Workshop on Multi-Core Computing...
1
by: mknoll217 | last post by:
I am recieving this error from my code: The multi-part identifier "PAR.UniqueID" could not be bound. The multi-part identifier "Salary.UniqueID" could not be bound. The multi-part identifier...
9
by: gstar | last post by:
Hi, Not sure I am in the right place here but thought I would ask an open question. We have an IIS website, mainly ASP files, .NET 1 & 2, this is located in our DMZ. It connects back into the LAN...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.