aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2013-02-25 17:34:56 +0100
committerLukas Larsson <[email protected]>2013-02-25 17:34:56 +0100
commita246ae201136048d4d7545c66b2e790502654833 (patch)
treecac2ca98cd4c78caf7644d6f0d0fe993ca0869d2 /erts
parentd4d98b8649d24f0a8c267e360bf58e54f04ae505 (diff)
parentc717fc6e0d660cb39f09dc079643991559168d40 (diff)
downloadotp-a246ae201136048d4d7545c66b2e790502654833.tar.gz
otp-a246ae201136048d4d7545c66b2e790502654833.tar.bz2
otp-a246ae201136048d4d7545c66b2e790502654833.zip
Merge branch 'lukas/erts/default_ports_win32/OTP-10892'
* lukas/erts/default_ports_win32/OTP-10892: Update to work with new default windows max ports Set default max ports on win32 to 8192
Diffstat (limited to 'erts')
-rw-r--r--erts/doc/src/erl.xml2
-rw-r--r--erts/emulator/beam/erl_port.h11
2 files changed, 13 insertions, 0 deletions
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml
index bd03fb4970..bb81330fec 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl.xml
@@ -665,6 +665,8 @@
than <c>65536</c>, the chosen value will increased to a value
larger or equal to the maximum amount of file descriptors that
can be opened.</p>
+ <p>On Windows the default value is set to <c>8196</c> because the
+ normal OS limitations are set higher than most machines can handle.</p>
<p>Previously the environment variable <c>ERL_MAX_PORTS</c> was used
for setting the maximum number of simultaneously existing ports. This
environment variable is deprecated, and scheduled for removal in
diff --git a/erts/emulator/beam/erl_port.h b/erts/emulator/beam/erl_port.h
index 4052f4dbe8..377aa72ed5 100644
--- a/erts/emulator/beam/erl_port.h
+++ b/erts/emulator/beam/erl_port.h
@@ -31,7 +31,18 @@ typedef struct ErtsProc2PortSigData_ ErtsProc2PortSigData;
#include "erl_thr_progress.h"
#include "erl_trace.h"
+#ifndef __WIN32__
#define ERTS_DEFAULT_MAX_PORTS (1 << 16)
+#else
+/*
+ * Do not default to as many max ports on Windows
+ * as there are no os limits to stop system
+ * from running amok. If allowed to go too high
+ * windows rarely recovers from the errors and
+ * other OS processes can be effected.
+ */
+#define ERTS_DEFAULT_MAX_PORTS (1 << 13)
+#endif /* __WIN32__ */
#define ERTS_MIN_PORTS 1024
extern int erts_port_synchronous_ops;