[Errno 24] Too many open files

Hello, I have Rockstor stable version 3.9.2-51 (subscriber to Stable updates) running several shares all with scheduled BTRFS snapshots (hourly).

Brief description of the problem

Before some time, task scheduler started to report “errors” for the scheduled BTRFS snapshot tasks. This was solved by Rockstor restart. But recently another problem arised: After login, I always receive this error:

<strong>Houston, we've had a problem.</strong>
Exception while running command(['/usr/bin/hostnamectl', '--static']): [Errno 24] Too many open files

Detailed step by step instructions to reproduce the problem

After restart, when I deactivate all scheduled tasks, everythink seems to be OK, but when I re-enable then and wait several days, then this error occurs.

Web-UI screenshot

Error Traceback provided on the Web-UI

Traceback (most recent call last): File "/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py", line 41, in _handle_exception yield File "/opt/rockstor/src/rockstor/storageadmin/views/appliances.py", line 41, in get_queryset self._update_hostname() File "/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/utils/decorators.py", line 145, in inner return func(*args, **kwargs) File "/opt/rockstor/src/rockstor/storageadmin/views/appliances.py", line 48, in _update_hostname cur_hostname = gethostname() File "/opt/rockstor/src/rockstor/system/osi.py", line 778, in gethostname o, e, rc = run_command([HOSTNAMECTL, '--static']) File "/opt/rockstor/src/rockstor/system/osi.py", line 112, in run_command 'Exception while running command({}): {}'.format(cmd, e)) Exception: Exception while running command(['/usr/bin/hostnamectl', '--static']): [Errno 24] Too many open files

I think this is a bug and you should create an issue in their tracker :)-

Hi @Lukas, and thank you for the report.

Thanks to you as well, @Marenz (and welcome!). You are correct that this is a bug and should be reported in an issue. As it turns out, this error has been a rather annoying one to troubleshoot as it seems to be impacting only a select number of systems and a reproducer has yet to be found.

The best reference would be the following post by @phillxnet:

As you can see, this is something that is difficult to pinpoint exactly and the latest evidence seems to be related to either (or both) of the following:

  1. AFP is enabled
  2. webUI left opened for a long time

@Lukas, would you by any chance fit in either one of these cases?

Sorry I can’t be of more help–@phillxnet and others may have better feedback to give you–but that one has been a difficult one to troubleshoot. This is for this exact reason that your report will hopefully be very helpful, however, so thanks in advance for it!

1 Like

thank you @Flox for your reply.

The only thing, that temproray solve the problem (for a couple of days) is to restart the Rockstor (using
> systemctl ...).

As the evidence mentioned:

  1. AFP is disabled
  2. No, this is not the case of webUI opened for a long time, because even the restart does not help.

I will now delete all snapshots and deactivate all BTRFS snapshot tasks and see, if that helps. Did someone try to schedule the rockstor restart on every day basis?

1 Like