WiredTiger - "too many open files error" during resync of a secondary replica set member
checkout your /etc/security/limits.conf file and change soft and hard limits according to your need.

* soft nofile 4096

* hard nofile 4096

in the first column * means this limit is applied for all users except root user.
you also need to edit /etc/pam.d/common-session* file add the following line in the end :

session required pam_limits.so

or else 


  ulimit -n 65535 (and no reboot required)


Finally, logout/reboot .