Change the open file limits in /etc/security/limits.conf and Change the kernel parameters that need changing.