hpi-swt2/vm-portal

Errno::EMFILE (Too many open files @ rb_sysopen)

Closed this issue · 3 comments

$tail -n 200 -f /var/www/vm-swt-hrmt-master.eaalab.hpi.uni-potsdam.de/current/log/production.log

FATAL -- : [f359b84a-5272-4381-9ab8-f3209aabfff6] Errno::EMFILE (Too many open files @ rb_sysopen - /var/www/vm-swt-hrmt-master.eaalab.hpi.uni-potsdam.de/releases/337/app/views/dashboard/index.html.erb)

This occurs when trying to load pages.
I assume many files in git are opened and they aren't closed

Happens in prod as well as in dev, when loading the dashboard often

Due to Stackoverflow, we have the following problem: https://stackoverflow.com/questions/40597488/ruby-too-many-open-files-rb-sysopen, which means that there are to many processes running/open.
@BraunTom and I tried to reproduce the error today. We could NOT reproduce it in 15 Minutes on hart-dev with two people spamming F5 on the VMs details page and could also NOT reproduce the problem in our local setup. Also setting the ulimit to a very low value (e.g. 8) did not produce the problem locally.

Furthermore, I unluckily can't have a look into the nginx errors on the server, due to not having root rights on the server. We also don't see any error in Errbit.

We sadly can't continue our testing for now, because vSphere is now also down...

After coming back a while later I found out, that we keep tcp connections to vsphere open until we are not allowed to create new any more.