473,657 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("Person ID") 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 1402
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("Person ID") 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.inv alidwrote:
>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("Person ID") 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.publi c.inetserver.ii s, 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.inv alidwrote:
>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.publi c.inetserver.ii s, 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
2155
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 test environment. All the PHP scripts start with a few lines of: require_once "library file at specific location on server"
12
3869
by: * ProteanThread * | last post by:
but depends upon the clique: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=954drf%24oca%241%40agate.berkeley.edu&rnum=2&prev=/groups%3Fq%3D%2522cross%2Bposting%2Bversus%2Bmulti%2Bposting%2522%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den ...
0
3770
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 and white CCITT4 compressed files (frames) inside the tiff. Every now and then I receive a mixture of black and white CCITT4 and JPEG compressed files, and sometimes just multi-page tiffs with JPEG only. The code runs great when dealing with the...
6
8165
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
1339
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 desktop. This distribution is based on the Ubuntu Live Linux CD. In many ways, the outstanding experience available from the Mono Live CD is made possible from Ubuntu. Since Ubuntu features GNOME as the default desktop, it only follows that due to...
2
1880
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 website directory the application gets restarted and the web server needs to recompile all my aspx-pages. Because the traffic is high the web server needs to recompile a lot of aspx-pages at the same time. Because of this alot of requests gets...
0
1752
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 quick-and-dirty in style, partly because half of the program was written in a moment of inspiration, and the other half was written and rewritten in real-time... :-D I've only tested this on Linux, using python 2.4.3. Reports of working or...
0
2320
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 Systems (MuCoCoS'08) Barcelona, Spain, March 4 - 7, 2008; in conjunction with CISIS'08. <http://www.par.univie.ac.at/~pllana/mucocos08> *********************************************************************** Context
1
9303
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 "PAR.UniqueID" could not be bound. The multi-part identifier "PAR.PAR_Status" could not be bound. The multi-part identifier "Salary.New_Salary" could not be bound. The multi-part identifier "Salary.UniqueID" could not be bound. The multi-part...
9
1724
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 using using port 1433 to our SQL 2000 server. As the Sysadmin I try to ensure our development team only work on the development SQL & IIS boxes but this is becoming more difficult by the day. Very soon I am moving the production servers to a...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6166
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.