type unlimt -a to see all limits. To change open file limit, edit the file /etc/security/limits.conf as root and add these lines
* soft nofile 4096 * hard nofile 4096
I rebooted after this just in case (may be reboot is not needed). Now it works. When I do
>ulimit -n 4096
Reference: thanks to lornix answer