You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/opt/conda/lib/python3.7/site-packages/prometheus_client/process_collector.py", line 84, in collect
value=float(line.split()[3]))
ValueError: could not convert string to float: b'unlimited'
try:
with open(os.path.join(pid, 'limits'), 'rb') as limits:
for line in limits:
if line.startswith(b'Max open file'):
max_fds = GaugeMetricFamily(self._prefix + 'max_fds',
'Maximum number of open file descriptors.',
value=float(line.split()[3]))
break
open_fds = GaugeMetricFamily(self._prefix + 'open_fds',
'Number of open file descriptors.',
len(os.listdir(os.path.join(pid, 'fd'))))
[root@demo ~]# ulimit -Hn unlimited
-bash: ulimit: open files: cannot modify limit: Operation not permitted
[root@demo ~]# ulimit -Hn "unlimited"
-bash: ulimit: open files: cannot modify limit: Operation not permitted
I'll bring this up in #SmartOS and see if this semantic can be fixed. For now if anyone reads this, just set integer limits. Ex. ulimit -Sn 1024, ulimit -Hn 4096.
Activity
brian-brazil commentedon Mar 15, 2019
Are you on Joyent? I believe this is non-standard output they produce.
Smithx10 commentedon Mar 16, 2019
@brian-brazil, I believe you are correct.
Attempting to set unlimited in Linux
I'll bring this up in #SmartOS and see if this semantic can be fixed. For now if anyone reads this, just set integer limits. Ex. ulimit -Sn 1024, ulimit -Hn 4096.
Thanks for the response 👍