如何使用 windows 增加 erlang 中同时存在的最大端口数

how increase the maximum number of simultaneously existing ports in erlang using windows

我正在使用 windows,我想将同时存在的端口的最大数量设置为 65536。在 Erlang 文档中它说:

ERLAG doc here , visit for syntax

+Q Number|legacy
Sets the maximum number of simultaneously existing ports for this system if a Number is passed as value. Valid range for Number is [1024-134217727]

On Windows the default value is set to 8196 because the normal OS limitations are set higher than most machines can handle.

If legacy is passed as value, the legacy algorithm for allocation of port identifiers will be used. Using the legacy algorithm, identifiers will be allocated in a strictly increasing fashion until largest possible identifier has been reached. Note that this algorithm suffers from performance issues and can under certain circumstances be extremely expensive. The legacy algoritm is deprecated, and the legacy option is scheduled for removal in OTP-R18.

我使用了下面的语法,但它给我语法错误,怎么了?

鉴于我的声誉不允许我发表评论,我只回答...

如果您不喜欢通过批处理脚本或命令 window 启动 erlang VM,您可以为 werl.exe 创建一个 link 并编辑它执行的命令右键单击并更改所述 link 的属性。例如:

默认link目标:"C:\Program Files (x86)\erl5.10.4\bin\werl.exe"

会变成:"C:\Program Files (x86)\erl5.10.4\bin\werl.exe" +Q 65536

这也允许针对不同的projects/applications进行不同的配置。

另一种方法是使用 .bat 脚本而不是 link。