$OpenBSD: patch-odoo_service_server_py,v 1.2 2020/12/20 19:18:25 robert Exp $

Index: odoo/service/server.py
--- odoo/service/server.py.orig
+++ odoo/service/server.py
@@ -70,14 +70,14 @@ def memory_info(process):
     # psutil < 2.0 does not have memory_info, >= 3.0 does not have get_memory_info
     pmem = (getattr(process, 'memory_info', None) or process.get_memory_info)()
     # MacOSX allocates very large vms to all processes so we only monitor the rss usage.
-    if platform.system() == 'Darwin':
+    if platform.system() == 'OpenBSD':
         return pmem.rss
     return pmem.vms
 
 
 def set_limit_memory_hard():
     if os.name == 'posix' and config['limit_memory_hard']:
-        rlimit = resource.RLIMIT_RSS if platform.system() == 'Darwin' else resource.RLIMIT_AS
+        rlimit = resource.RLIMIT_RSS if platform.system() == 'OpenBSD' else resource.RLIMIT_AS
         soft, hard = resource.getrlimit(rlimit)
         resource.setrlimit(rlimit, (config['limit_memory_hard'], hard))
 
@@ -1020,7 +1020,7 @@ class WorkerHTTP(Worker):
         # latencies & b/w saturation. This timeout is also essential to protect against accidental
         # DoS due to idle HTTP connections.
         sock_timeout = os.environ.get("ODOO_HTTP_SOCKET_TIMEOUT")
-        self.sock_timeout = float(sock_timeout) if sock_timeout else 2
+        self.sock_timeout = float(sock_timeout) if sock_timeout else 5
 
     def process_request(self, client, addr):
         client.setblocking(1)
