Mat, I'd not say it's "flawed", just a different beast compared to your
prior experience. :-) In a standalone app, you don't likely have more than
one user. In a web app, you can have dozens, hundreds, thousands, or tens of
thousands. 

Consider especially that when you're storing info in sessions, then that is
also not "how many people are using the app now", but rather "how many have
used it over the timeframe of your session timeout.

More than that, many don't realize that sessions are created anew for EVERY
PAGE VISIT by a spider or bot, because they tend not to honor the cookie CF
provides to track users. So it's not unusual to find CF tracking ten to
hundreds times more sessions than you'd expect.

If you're on CF 8 or 9 Enterprise or Developer edition, you can see how many
sessions there are using the CF Server Monitor's "Active sessions" page,
clicking the graph in its top right corner. If on another version of CF, you
could use Aussie Mark Lynch's excellent free ServerStats tool. I link to
that and discuss this whole problem more at this blog entry:

http://www.carehart.org/blog/client/index.cfm/2009/1/22/tracking_count_of_se
ssions_per_application

Of course, if that link breaks over two lines, please reconnect it before
saying it doesn't work. :-)

Then consider as well what your session timeout is. The longer it is, and
the more stuff you put in the session scope, and the more users/bots that
visit, the more memory will be taken for sessions. And this memory cannot be
GC'ed until it's no longer in use (the session times out). Sometimes another
solution to a problem like this is lowering the session timeout (for the
app, in the application.cfc/cfm or in the CF Admin if you rely on its
default session timeout setting). Then, too, some go a step further to lower
the session timeout specifically for requests that are deemed to
spiders/bots. I won't elaborate this here until you know that's your issue
and needed solution.

Let us know if this info helps, Mat.

/charlie arehart

char...@carehart.org

Providing fast, remote, on-demand troubleshooting services for CF (and
CFBuilder)

More at http://www.carehart.org/consulting

 

 

From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf
Of Mathew Sayers
Sent: Wednesday, August 10, 2011 7:51 AM
To: cfaussie@googlegroups.com
Subject: RE: [cfaussie] Re: How to load balance

 

I think you're correct because I am using so many session objects the server
can't cope with the load; actually it's really only 3 per session but they
each hold a collections of other objects; I've used this approach before for
java stand alone apps and it has worked really well because the collections
are in hashmaps so the memory is indexed; however it seems flawed on a web
server because it's eating all the memory. 

 

I did find the following link to be really helpful in tuning the jvm and I
set a scheduled job to run a runtime and system garbage collection when the
heap space reached a 1gb.

http://www.coldfusionmuse.com/index.cfm/2008/2/12/leaky.heap.jvm

 

Assuming there is memory available the site works really well; I am looking
at new designs; but to buy time I am also wondering about upgrading the
server to 64bit and upgrading to CF9 enterprise; any thoughts or tips here? 

 

Thanks, 

Mat  

  _____  

From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf
Of Mark Mandel
Sent: Wednesday, 10 August 2011 12:24 PM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] Re: How to load balance

 

Actually, they said they were using session scope - if your users suddenly
ramp up, then that could easily explain the memory leak.

 

Is there anything you could consolidate into a single in memory store in the
application scope, rather than having it for every user?

 

Mark

On Wed, Aug 10, 2011 at 12:14 PM, daamsie <pe...@travellerspoint.com> wrote:

You might want to look into using something other than the CF
application scope to cache objects (assuming that's what you're
using). We've had pretty good experience using memcached. Though with
ehcache now integrated in CF, I'd probably be looking at that
instead.

Other than that, definitely look at JVM tuning. I'd agree - get
someone else who knows it well to help you through that. It will save
a lot of guesswork and you'll learn a lot through the process.


On Aug 9, 12:26 pm, Mat <mathew.say...@gmail.com> wrote:

> Hi All,
>
> I am new to the group and was hoping someone can help me with a
> solution to the following; we have created an application using java
> and cold fusion; we do create a lot of Java objects that we hold in
> memory at the session level. We are getting an out of memory error;
> basically the heap space fills up; server slows to the point that it
> crashes.
>
> First thought is we have a memory leak; I am using jconsole, nice
> graphs but what is it really telling me; if anyone knows of a
> monitoring tool that will help me see if we have memory that is not
> being cleared that should be and what that memory is; would be
> appreciated?
>
> Second thought is we designed the application to hold a lot in memory
> to save time hitting the db; I wonder if we are just under resourced.
> We are running CF 8,0,1,195765 STD, Java 1.6.0_04, on a Windows 2003
> 32bit Svr. I do have a second server available; does anyone have
> instructions on how to setup load balancing so that I can have two
> servers sharing the load?
>
> Any help would be most appreciated?
>
> Many Thanks,
> Mat

--
You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com
<mailto:cfaussie%2bunsubscr...@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.




-- 
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

cf.Objective(ANZ) + Flex - Nov 17, 18 - Melbourne Australia
http://www.cfobjective.com.au

-- 
You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

Reply via email to