diff options
| author | Xavier Morel <xmo@odoo.com> | 2019-12-17 13:46:28 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2019-12-18 06:56:24 +0000 |
| commit | a3371a467b227b9cf57d582808bf3a252bcf1fa9 (patch) | |
| tree | de53f9a51ac46ff21bc6174c1089b1e0786a93e9 /addons/web_editor/static/src | |
| parent | f26760e2f4c856cdcf49d889ba6047e42a137613 (diff) | |
[FIX] core: ask OS to pick CDT port
When running multiple odoo on the same machine (in order to test
multiple things concurrently, etc...) it's easily enough to start them
on 8069, 8070, 8071, ... and that *seems* to work, but then they start
walking on one another and *losing* chromes entirely, so you end up
with hundreds of chrome processes: right now with 2 Odoo running tests
my machine is at 365 Chrome processes, 550 process and 3180 threads
total (should be ~160 and ~700 with 2 chrome processes at most).
Instead, ask the OS to ask for a devtools port, then close the socket
and pass that to the child process. There's a race of sort for the
instant between closing the socket and Chrome reopening it, but:
* the window is very short
* we got a random port from the ephemeral range, it's possible
somebody else gets it inbetween but unlikely (the 50% on a birthday
attack is 200 for Linux's ephemeral range, it's a somewhat lower 150
for the IANA range used by BSDs and Windows)
Sadly chrome doesn't stop if it can't bind to the port it's given.
closes odoo/odoo#42102
X-original-commit: 897ded1cb8b675024d75c6975ca171dbefdfc333
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src')
0 files changed, 0 insertions, 0 deletions
