Hello, this appears to be a limitation of the operating system: RHEL 6.5 + kernel 4.4.159 (elrepo).
Using a modern kernel on such an old system causes inconsistencies in resource management, especially when creating threads.
Even if you have enough memory, if these values are low, threads cannot be created. Please check these outputs:
ulimit -u
ulimit -a
cat /proc/sys/kernel/threads-max
cat /proc/sys/kernel/pid_max
cat /proc/sys/kernel/thread-max
grep -i oom /var/log/messages
free -m
Also check the ossec user limits:
su - ossec
ulimit -a
This is corrected in:
/etc/security/limits.conf:
ossec soft nproc 4096
ossec hard nproc 4096