Asterisk mbox server memory usage

Is anyone using the asterisk_mbox_server and found that it uses a huge amount of memory when it runs? I’m trying to set it up on my (small) asterisk server running on a RPi, and it quickly consumes all of the memory in the system and dies when systemd nukes it. In fact, it’s using quite a bit more memory than anything else on the system, including asterisk, mysql, or apache.

There are only 5 messages in my mailbox, but the cdr database is large. Is it trying to store the entire cdr record set in memory?

I’m going to try and find some time to dig through the code, but wanted to see if anyone else had been bitten by this first…

What does this have to do with home assistant?

https://www.home-assistant.io/docs/asterisk_mbox/ – It’s a provided integration

Are you saying the integration is using memory? I thought you were saying the asterisk server, or some addon to it was using memory.

In order to use the integration, you have to install asterisk_mbox_server on the asterisk server as described in the link above. That server appears to be coming from the Home Assistant github tree. It uses enough memory quickly enough that systemd kills it off.

With a bit of testing, I’ve confirmed that this does appear to be a function of the size of the CDR database table. I pruned it down to under 200 records, and the service is now using a reasonable 21MB of memory.

According to pypi the homepage for asterisk_mbx_server is GitHub - PhracturedBlue/asterisk_mbox_server

Thanks, I’ll open an issue there. Given that it can only montor a single mailbox and the integration doesn’t attempt to format the CDR logs, this may not be worth the effort of getting to up and running. I may have to take a stab at writing something that uses the asterisk manager interface to provider more functionality. If I ever get any free time…