SOLVED Creating new domain causes FreeSWITCH severe errors, maybe lua max string size issue

Status
Not open for further replies.

Zivk

Member
Apr 7, 2019
35
6
8
62
Hi,

I have a large production FreeSWITCH + FusionPBX machine, >250 domains, each has its own Inbound Routes (and all other domain stuff). Suddenly, when creating a new domain, FreeSWITCH (switch_xml.c) started to complain about "unexpected closing tag </extension>", which is very bad because when this happens, no inbound call can start in any domain.

Looking at cache file /var/cache/fusionpbx/dialplan.public (a cache of Inbound Routes that FusionPBX creates), I see indeed a piece of truncated XML. The file size is 730K, the truncation point is circa mid of file.

Looking at FusionPBX file .../resources/install/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua (apparently the FusionPBX lua script that generates the XML mentioned above), it seems that the XML is created in one string variable XML_STRING.

Searching the web for lua string size limitations, all I could find is a Wikipedia entry that says "Lua can process text string in excess of 230,000 characters" which is enigmatic to me, I don't understand whether 230,000 is the approximate size limit.

Splitting the large FreeSWITCH + FusionPBX machine into few small ones is vast effort that I'd rather avoid.

Did anyone experienced this issue? Is there a way to go around it?

ADDED: I've tested lua string size under FreeSWITCH, no problem up to 10MB (didn't test beyond). So the problem is somewhere else along the line.

Thanks a lot
 
Last edited:

Zivk

Member
Apr 7, 2019
35
6
8
62
Thanks @DigitalDaz.
We found indeed a reason for the problem which is specific to our environment (and therefore no benefit in describing it here).
Sorry everyone for the white noise.
 
  • Like
Reactions: DigitalDaz
Status
Not open for further replies.