### Description
Hi, I'm running some tests on top of Kamailio 5.3.5 (x86_64/linux) 9e70e8 on CentOS with ~1.2k registered endpoints. While I try to dump registered contacts it fails: ``` [root@v0p1356-dispatcher kamailio]# kamcmd ul.dump error: 500 - Internal error creating aor struct [root@v0p1356-dispatcher kamailio]# kamcmd ul.db_contacts location 1172 [root@v0p1356-dispatcher kamailio]# ```
### Troubleshooting
I'm running kamailio with -m 512 -M 128 and like suggested in #1513 I've tuned ctl module settings but no luck ``` modparam("ctl", "binrpc_buffer_size", 4096) modparam("ctl", "binrpc_max_body_size", 16)
```
#### Reproduction
send >1000 registrations
#### Log Messages
``` Jul 28 15:12:13 localhost /usr/sbin/kamailio[55179]: ERROR: ctl [binrpc_run.c:1094]: rpc_struct_add(): failed to add attribute-value ({) ```
### Additional Information
``` [root@v0p1356-dispatcher kamailio]# kamailio -v version: kamailio 5.3.5 (x86_64/linux) 9e70e8 flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, 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_BLACKLIST, HAVE_RESOLV_RES 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: 9e70e8 compiled on 14:35:46 Jun 22 2020 with gcc 4.8.5 [root@v0p1356-dispatcher kamailio]#
```
* **Operating System**:
``` Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-1127.el7.x86_64 Architecture: x86-64 ```
@denyspozniak gave me a tip with
``` loadmodule "jsonrpcs.so" modparam("jsonrpcs", "transport", 2) modparam("jsonrpcs", "pretty_format", 1 ``` and later on `[root@v0p1356-dispatcher kamailio]# kamctl rpc ul.dump location ` works like a charm. But still ul.dump should work I think?
Closed #2412.
Depending on how many records you have in location table, you have to increase the values for ctl parameters, because it uses static buffers of those sizes. kamcmd communicates with ctl module.
jsonrpcs module is using dynamic allocation as it needs. kamctl communicates with jsonrpcs module, so it works.
For further discussions, this has to be continued on sr-users mailing list, not being a bug in the code, but modparam tuning.