### Description

<!--
Explain what you did, what you expected to happen, and what actually happened.

- we migrated rtpengine urls from udp to websocket, so that kamailio is 
communicating to rtpengine overwebsocket to manage the offer and answer. 
however we observed that, tcp reciever process is consuming pkg memory as, 
traffic increased, but when traffic is idle then its not getting freed 
automatically. and eventually its consume all memory.
-
- 
-->

### Troubleshooting
- as checked further we particulartly tcp reciever process was consuming pkg 
memory , then further we checked from corex pkg_sumary for that process id, and 
found that rtpengine: rtpengine.c: send_rtpp_command was consuming highest 
memory.


#### Reproduction
console rtpengine url with ws endpoint.
<!--
If the issue can be reproduced, describe how it can be done.
-->
this is reproducible, we can configure websocket in rtpengine module and then 
we can initate calls. and increase the number of calls over the period of time

#### Debugging Data
<img width="1399" alt="Screenshot 2024-03-06 at 4 30 16 PM" 
src="https://github.com/kamailio/kamailio/assets/115363081/0904892e-6a6e-4dc1-8501-a5bbad00d818";>

kamcmd pkg.stats

        entry: 24
        pid: 378355
        rank: 17
        used: 7467640
        free: 24348320
        real_used: 9206112
        total_size: 33554432
        total_frags: 66
        desc: tcp receiver (generic) child=0

kamcmd corex.pkg_summary pid 378355
Mar  6 16:31:52 coreproxy-4 /usr/local/sbin/kamailio[378355]: ALERT: qm_sums: 
qm_sums():  count=  8075 size=   4638760 bytes from rtpengine: rtpengine.c: 
send_rtpp_command(3040)


### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

```
(paste your output here)
version: kamailio 5.7.0 (x86_64/linux) 
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, 
USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, 
F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, 
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, 
TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, 
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown 
compiled on 01:04:28 Jan 25 2024 with gcc 9.4.0
```

* **Operating System**:


<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 
16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `lsb_release -a` and `uname -a`)
-->

```
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

Linux coreproxy-4 5.15.0-1045-oracle #51~20.04.1-Ubuntu SMP Fri Sep 22 14:25:26 
UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

```


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3777
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/issues/3...@github.com>
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to