[asterisk-users] Asterisk memory problems

2009-05-27 Thread Ikin Wirawan
Hi guys, we have the following problem

After putting our Asterisk/PHP application on production, there is one big
problem, ie memory leak after a period of usage (about 20MB after 2 minutes)

There are also two more info that may help:
1) Asterisk consumes 495mb of memory on this production server, while only
42kB on local/development machine
2) agi_ccmain (and other agi scripts) consumes 146mb of memory on
production, while only 32kB on local

Also on local, we do not experience the memory leak (or maybe since the
memory usage itself is small it's hardly noticeable)

The only difference that I am aware of is that on production, DAHDI is
installed

My questions are:
- How come Asterisk, and my PHP/AGI scripts consume so much memory on
production compared to local machines?
- Any idea why there is a memory leak? IAll of the PHP scripts are done
executing, so memory should all be released. Is it a bug on Asterisk?

We are using Asterisk 1.6.0.6  CentOS 5.2 on production

Any help is kindly appreciated

Sincerely,



-- 
Ikin Wirawan
Chief Executive Officer
PT Walden Global Services
Integrity, Learning, Sharing, Excellence
http://www.wgs.co.id
http://www.kiranatama.com - Web 2.0 development
http://www.qorser.com - VoIP solutions
http://www.hellomedia.co.id - Digital design  promotions
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk memory problems

2009-05-27 Thread David Backeberg
On Wed, May 27, 2009 at 2:33 AM, Ikin Wirawan i...@qorser.com wrote:
 There are also two more info that may help:
 1) Asterisk consumes 495mb of memory on this production server, while only
 42kB on local/development machine
 2) agi_ccmain (and other agi scripts) consumes 146mb of memory on
 production, while only 32kB on local

This is the second or more questions in a few days that claims memory
leak with no proof. Please google 'memory leak' before throwing around
the term. You do not have any evidence of that.

As for why it takes more memory in production than in your test, an
obvious guess is because there are more simultaneous instances of your
process in your production environment than in your test environment.

Here's how you compare apples to apples...
Put your test server into production, and then compare the memory
usage. You have way too many variables to make any conclusions about
anything.

 My questions are:
 - How come Asterisk, and my PHP/AGI scripts consume so much memory on
 production compared to local machines?

I don't know, and neither do you. Switch the systems and try again. Do
you have the same version, same compiled options, and same number of
simultaneous PHP engines running in your test? The obvious suggestion
is you are running more instances of your AGIs in prod than in test.
Ergo, more memory usage.

 - Any idea why there is a memory leak? -

You don't have any evidence of a memory leak. Linux caches programs in
ram in the event they get run again. Linux the kernel and other smart
programs cache/buffer previously used items in memory, in the (usually
likely) event that you want them again, and they won't have to be read
from hard drive in the future. That's not called a memory leak. That's
called evidence-based performance enhancements.

Is it a bug on Asterisk?

Doubtful.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users