Grep'ing for a phone number in large Master.csv causes the sip peers to loose connectivity briefly

folks,
i have a strange issue on asterisk 13.25.0 and centos 7:
i was grep ing for a phone number in /var/log/cdr-csv/Master.csv which was about 670MB; looks like it was not rotated in a while. this caused most of the sip peers to go unreachable and after a few seconds, they were reachable again.

the issue wont happen on smaller context.csv files

i was able to duplicate the issue after hours the load average as per top cmd was around 0.5 while i was running the grep cmd

i have since then rotated the Master.csv file

  1. anyone have any ideas?
  2. is this a known issue? should i be on the look out for any such large file searches?
  3. any suggestions, information is appreciated.

thanks

It sounds like you found the solution, manually, but to automate this you could consider a patch into CDR subsystem which emits warnings when there are significant delays in CDR processing, add a note to the cdr.conf.sample file about large CDR CSV files, or try out CDR batch mode to buffer CDRs (see cdr.conf for details.)

Non-Asterisk solutions are also available for watching file and directory sizes, emailing you alerts, etc.

Peers got unreachable by doing a grep search to a CSV file ?

Is this a virtual machine?

It sounds like there may be inadequate physical memory.

Thanks for the responses, yes, this is on a virtual machine.
According to fee and top cmds:
12137600kb total mem
305852kb free
1841100kb used
9990648kb buff/cached

You need the information from the host, not the virtual machine.

Ideally you wnat to set the virtual machine size to be a value that can be 100% committed against physical memory on the host. I think you are thrashing the host.

Also, I think the units are probably kB, not kb (factor of 8 difference)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.