import subprocess
import sys
import time
+import resource
import arvados.commands._util as arv_cmd
from arvados_fuse import crunchstat
if self.args.logfile:
self.args.logfile = os.path.realpath(self.args.logfile)
+ try:
+ nofile_limit = resource.getrlimit(resource.RLIMIT_NOFILE)
+ if nofile_limit[0] < 10240:
+ resource.setrlimit(resource.RLIMIT_NOFILE, (min(10240, nofile_limit[1]), nofile_limit[1]))
+ except Exception as e:
+ self.logger.warning("arv-mount: unable to adjust file handle limit: %s", e)
+
+ self.logger.debug("arv-mount: file handle limit is %s", resource.getrlimit(resource.RLIMIT_NOFILE))
+
try:
self._setup_logging()
self._setup_api()
disk_cache=self.args.disk_cache,
disk_cache_dir=self.args.disk_cache_dir),
'num_retries': self.args.retries,
- })
+ },
+ version='v1',
+ )
except KeyError as e:
self.logger.error("Missing environment: %s", e)
exit(1)