Page 1 of 1

Problem with remote_agent script

PostPosted: Tue May 27, 2008 6:48 am
by brainstorm
hy friends,

I am making 1 remote agent logged in, Now for example Its dialing one lead and establish a call and total 2 sip channels. Like below....
-----------------------------------------------------------
*CLI> sip show channels
Peer User/ANR Call ID Seq (Tx/Rx) Format Hold Last Message
192.168.1.67 9999003116 042afe2103e 00102/00001 0x80004 (ulaw|h No Rx: ACK
192.168.1.66 9999999999 0eda226c398 00102/00000 0x80004 (ulaw|h No Tx: ACK
2 active SIP channels
-----------------------------------------------------------


Now, befor the call finish I am making the remote agent INACTIVE. So wen call finished there shud not be any active channel in Asterisk. But It shows me the following channel active.
------------------------------------------------------------
*CLI> sip show channels
Peer User/ANR Call ID Seq (Tx/Rx) Format Hold Last Message
192.168.1.66 9999999999 0eda226c398 00102/00000 0x80004 (ulaw|h No Tx: ACK
1 active SIP channel
------------------------------------------------------------


means that, the remote agent script is not clearing the INACTIVE remote agent channels.
What shud I do ??? :roll: :roll: :roll:

PostPosted: Tue May 27, 2008 7:38 am
by mflorell
You must be doing performance testing, no the agent channels are not cleared. Never got around to writing the looping processes or logic to take care of that.

PostPosted: Wed May 28, 2008 1:36 am
by brainstorm
oh yes, u r right, I am doing the performance testing. But the problem is of memory leak.

since the agent channel is not cleared, as the call goes...memory is constantly incresing, and after some time my pc stucks and fails to respond becoz there is no more inough memory. Even it sucks the swap mem also.

plz suddgest me wt shud i do to solve the mem-leak problem ?? :( :( :(

PostPosted: Wed May 28, 2008 9:55 am
by mflorell
How much memory is on your system?

PostPosted: Thu May 29, 2008 7:14 am
by brainstorm
I have 8GB of main memory and 8GB of swap memory.

PostPosted: Thu May 29, 2008 7:49 am
by mflorell
If you have 8GB memory and you are running out of it and crashing then you probably have a Linux kernel problem or a hardware problem in the board/CPU/RAM.

I have run performance testing on systems with less RAM for days after they hit full RAM usage with no problems. I would recommend that you run memtest on your system for at least 12 hours and see if it comes up with anything.

PostPosted: Mon Jun 02, 2008 2:39 am
by brainstorm
befor performance testing I have tested with a single call.

Let me explain in brief,,,,,
I have valgrind so i m running asterisk under valgrind. and then I have a single agent online with one call at a time. So it have 2 sip channels. Now as the call finishes I am stopping the asterisk and valgrind gives me "No leakes are possible" summery message.

I think it may be possible tht If channels are established and terminated successfully then u will not find any kinda mem leak, but if a channel is hanged up abnormally only then thre may be a mem leak prob....

wt do u think.......?? :cry: :cry: :cry: