Try standard ulimit or /etc/security/limits.conf to the maximum number of processes per / user.To limiting RAM cgroup.memory, to limiting CPU cgroup.cpu, to filter access to the network cgroup.net_cls +