When migrating the data to cloud, CIS agents stops randomly with an error "socket: too many open files". This is because the Max open files resource is set with the lower 'soft limit' and 'hard limit' values. In SLES 12, the default values of 'soft limit' and 'hard limit' for Max open files resource are 1024 and 4096 respectively.
To resolve this issue, increase the 'soft limit' and 'hard limit' values for Max open files resource:
Login to the server as a root user.
Obtain CIS agents process ID using the following command:
pgrep cisagents
For Max open files resource, set the 'soft limit' and 'hard limit' values to 65535 using the following command:
prlimit --pid <pid_of_cisagent_obtained_in_step2> --nofile=65535:65535
Verify the 'soft limit' and 'hard limit' values using the following command:
cat /proc/<pid_of_cisagent_obtained_in_step2>/limits | grep "open files"