System cpu goes to 100% when setting up syslog support

Hi guys, I manage getting into work syslog support.
It is working ok and I can see logs and trigger notifications.
Problem is that cpu goes to 100%.
Using htop I can see that syslog.php is taking 100%cpu.
I dont understand why it is going to high , I only sent one or two lines with logger.
As soon as I stop syslog-ng or rsyslog (I tryied with both) , cpu goes to normal value.

I also added to syslog.php script:

$fp = fopen('/opt/librenms/logg', 'w');
fwrite($fp, "line :".$entry);

in order to see what is going on but , nothing appears on logg file.

BTW , also tryed comment at syslog-ng.conf file:

#source s_sys {
#    system();
#    internal();
log {
#        source(s_sys);

There is no excesive log messages comming (verified with tcpdump)
To take cpe to normaI values , I need to remove syslog-ng from system ,
doing just systemctrl stop syslog-ng , dont shutdown the daemon and cpu continues high.

Please help me , I really like this feature.

How long did you leave syslog-ng run? apparently it can take a few hours to settle down.

You will need to run a git checkout syslog.php as if you modify a file librenms cannot update if that file is changed.

Dear Chas ; thanks for the response.

  1. How long.
    It was running for less than 5 mins.
    I had to remove it quickly, since CPU went to 100% and begin to slowdown other productions VMs guests.

  2. git checkout syslog.php done. file is at original state.

  3. Do you have any clue about this issue ?
    Any other thing to try ?

100% shouldn’t necessarily be an issue if it’s multi-core, do the VM guests have allocated cpu resources?

I would let it run for a few hours as a test when it is convenient to do so

Can you show output of validate.php and pastebin the syslog-ng conf file

Dear Chas , thanks for the followup,
Here you have:
validate.php out: