memory leak when keep-alived connection
lizhenghn123 opened this issue · 2 comments
hi, achaloyan,
I have a problem. It would be memory leak when the mrcp connection is keep-alived(long connection).
I see the mrcp connection(with mrcp port: 21544) once created, it will alloc memory by at https://github.com/unispeech/unimrcp/blob/master/libs/mrcpv2-transport/src/mrcp_connection.c#L23, and the memory would not free until the connection closed, at https://github.com/unispeech/unimrcp/blob/master/libs/mrcpv2-transport/src/mrcp_connection.c#L52.
But if the mrcp connection is keep-alived, it means the connection don't close, it will be keep long time, may be some days. And many requests will be transfer on this connection, it caused alloc memory more and more, but can't release(because the connection is already alive, don't close). So the memory will be increase util 100%.
Now how to fix it ? may the apr library can be memory reuse or manual release?
I use valgrind tool to check the memory leak, like this:
This is some information:
1. mrcpserver veriosn: 1.5.0
2. mrcpserver ip: 10.233.135.12
3. ivr ip:10.233.129.106
4. sip port: 20010, mrcp port: 21544;
5. ivr will be create 5 mrcp connections, and 100 sip sessions;
Some logs will be here. May you have some suggests ? Waiting for your reply, thanks a lot.
unimrcpserver.log
Can someone give some advice ?