Show More
@@ -25,6 +25,7 b' import wsgiref.util' | |||||
25 | import traceback |
|
25 | import traceback | |
26 | import tempfile |
|
26 | import tempfile | |
27 | import resource |
|
27 | import resource | |
|
28 | import psutil | |||
28 | from itertools import chain |
|
29 | from itertools import chain | |
29 | from cStringIO import StringIO |
|
30 | from cStringIO import StringIO | |
30 |
|
31 | |||
@@ -117,14 +118,21 b' def _string_setting(settings, name, defa' | |||||
117 | return settings[name] |
|
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 | class VCS(object): |
|
129 | class VCS(object): | |
121 | def __init__(self, locale_conf=None, cache_config=None): |
|
130 | def __init__(self, locale_conf=None, cache_config=None): | |
122 | self.locale = locale_conf |
|
131 | self.locale = locale_conf | |
123 | self.cache_config = cache_config |
|
132 | self.cache_config = cache_config | |
124 | self._configure_locale() |
|
133 | self._configure_locale() | |
125 |
|
134 | |||
126 | maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1] |
|
135 | log_max_fd() | |
127 | log.info('Max file descriptors value: %s', maxfd) |
|
|||
128 |
|
136 | |||
129 | if GitFactory and GitRemote: |
|
137 | if GitFactory and GitRemote: | |
130 | git_factory = GitFactory() |
|
138 | git_factory = GitFactory() |
General Comments 0
You need to be logged in to leave comments.
Login now