> -----Original Message-----
> From: Robert Shaw [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, December 03, 2002 10:13 AM
> To: CF-Talk
> Subject: 4.5.1 Memory Mgmt
> 
> 
> Hi All,
> I have some questions form one of my colleagues and I thought 
> maybe the list 
> could give me as much details at possible on this since I've 
> only worked 
> with CF 5 and not 4.5.1:
> 
> 1. How is memory management with CF 4.5.1 handled?

Fairly simplistically (as it was explained to me).  CF (being a server
app) will grab as much memory as it needs to perform any action you
request of it - it then keeps that memory assuming that it will need it
again.

(Simplistic, I know)

This means that one nasty job can suck memory that continues to be "in
use" by CF even during idle times.  This can often give the mistaken
impression that CF is leaking since it's using a lot of memory but not
doing anything.  But it's perfectly normal.

This isn't that uncommon among server apps... The idea is that CF (and
others like it, SQL Server and Exchange come to mind) assume that the OS
will protect the memory that it needs and that rest of the box is all
for the taking.  It's a "King of the Hill" mentality.

> 2. Are there memory leaks in CF 4.5.1?

Not that I'm aware of... But upgrading to the latest service packs is
always a good idea.  There are many potentials for leaks at interface
points however:

1) ODBC is the biggest culprit.  Make sure to update to the latest
drivers if you're experiencing problems and refrain from updating to the
latest drivers if you're not.
2) CFXs can also leak depending on what they do.  Since they run in the
CF memory space they can make CF appear leaky.
3) COM Objects are also possible leaks points.  Like CFXs they can run
in CF memory space (or not) and each can be different.
4) CF 4.5 makes calls to external libraries for most of it's protocol
level stuff (FTP, HTTP, POP, SMTP, etc) - if these services are leaky CF
may appear to be leaky.
5) The web server itself may be leaky.  This will generally not be
confused with CF (in detail) but may be the cause of a slow or leaky CF
Box (in a macro view).

Basically CF itself is pretty solid, but it touches or takes under its
memory wing dozens of potential problems.

> 3. If so, how can you work around these memory leaks?

First make sure that you have a leak and you're not just confusing CF
normal memory usage for leaking (you wouldn't be the first and you won't
be the last) then check out all external connection points.

Jim Davis


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to