diff --git a/odoo/service/server.py b/odoo/service/server.py index 12a1256bda7..0a1c2d71763 100644 --- a/odoo/service/server.py +++ b/odoo/service/server.py @@ -972,6 +972,11 @@ def start(preload=None, stop=False): _logger.warning("Unit testing in workers mode could fail; use --workers 0.") server = PreforkServer(odoo.service.wsgi_server.application) + + # Workaround for Python issue24291, fixed in 3.6 (see Python issue26721) + if sys.version_info[:2] == (3,5): + # turn on buffering also for wfile, to avoid partial writes (Default buffer = 8k) + werkzeug.serving.WSGIRequestHandler.wbufsize = -1 else: server = ThreadedServer(odoo.service.wsgi_server.application)