Solved Syslog-ng server Number of allowed concurrent connections reached

On my network I'm running a syslog-ng server but i reached the maximum number of allowed connections.

I try to set the max connections parameters in the source istance but when i try to restart the syslog-ng service don't work and tell me:

Code:
Error parsing afsocket, syntax error, unexpected KW_MAX_CONNECTIONS, expecting KW_NORMALIZE_HOSTNAMES or KW_USE_DNS or KW_USE_FQDN or KW_DNS_CACHE in /usr/local/etc/syslog-ng.conf at line 37, column 41:

  udp(ip("172.16.2.110") port(514) max-connections(250));
  ^^^^^^^^^^^^^^^

How can i fix this problem? I tried different syntax but nothing seem work..

This is a part of my syslog-ng.conf

Code:
options {
  perm(0644);
  dir_perm(0755);
  create_dirs(yes);
  group (logs);
  dir_group (logs);
  use_fqdn(yes);
  keep_hostname(yes);
  chain_hostnames(no);
  stats_freq(3600);
# Specifies how many lines are flushed to a destination at a time
# flush_lines(50);
# The number of entries in the output buffer (output fifo)
# log_fifo_size(4096);
  log_fifo_size(16384);
  frac_digits(3);
};

### SOURCE ###

source s_local {
  unix-dgram("/var/run/log");
  unix-dgram("/var/run/logpriv" perm(0600));
  internal();
  file("/dev/klog");
};

source s_network {
  udp(ip("172.16.2.110") port(514) max_connections(200));
  tcp(ip("172.16.2.110") port(514) max_connections(200));
};

and this is the syslog.log

Code:
Jul 20 00:00:00.022 syslog syslog-ng[67563]: Number of allowed concurrent connections reached, rejecting connection; client='AF_INET(172.16.2.27:58654)', local='AF_INET(172.16.2.110:514)', max='10'
 
UDP is a connection-less protocol, so there are no connections. Hence you can't set a maximum. It only works for TCP.
 
Back
Top