##// END OF EJS Templates
vcsserver: use safer maxfd reporting, some linux systems get a problem with this
milka -
r913:279dbe3d default
parent child Browse files
Show More
@@ -25,6 +25,7 b' import wsgiref.util'
25 25 import traceback
26 26 import tempfile
27 27 import resource
28 import psutil
28 29 from itertools import chain
29 30 from cStringIO import StringIO
30 31
@@ -117,14 +118,21 b' def _string_setting(settings, name, defa'
117 118 return settings[name]
118 119
119 120
121 def log_max_fd():
122 try:
123 maxfd = psutil.Process().rlimit(psutil.RLIMIT_NOFILE)[1]
124 log.info('Max file descriptors value: %s', maxfd)
125 except Exception:
126 pass
127
128
120 129 class VCS(object):
121 130 def __init__(self, locale_conf=None, cache_config=None):
122 131 self.locale = locale_conf
123 132 self.cache_config = cache_config
124 133 self._configure_locale()
125 134
126 maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
127 log.info('Max file descriptors value: %s', maxfd)
135 log_max_fd()
128 136
129 137 if GitFactory and GitRemote:
130 138 git_factory = GitFactory()
General Comments 0
You need to be logged in to leave comments. Login now