ports/www/odoo/patches/patch-odoo_service_server_py

22 lines
999 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Index: odoo/service/server.py
--- odoo/service/server.py.orig
+++ odoo/service/server.py
2023-10-01 03:21:04 +00:00
@@ -72,7 +72,7 @@ def memory_info(process):
2023-08-16 22:26:55 +00:00
# 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
2023-10-01 03:21:04 +00:00
@@ -1125,7 +1125,7 @@ class WorkerHTTP(Worker):
2023-08-16 22:26:55 +00:00
# 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
2023-10-01 03:21:04 +00:00
+ self.sock_timeout = float(sock_timeout) if sock_timeout else 60
2023-08-16 22:26:55 +00:00
def process_request(self, client, addr):
client.setblocking(1)