简体   繁体   English

Erlang:节点完全冻结。怎么办?

[英]Erlang: Node freezes totaly. Now what?

Platform: windows 7 32bit, erlang R15B01. 平台:windows 7 32bit,erlang R15B01。

I have developed an erlang server that simultaneously listens to 200 different tcp ports (200 gen_servers) 我开发了一个erlang服务器,同时监听200个不同的TCP端口(200个gen_servers)

After a few minutes of moderate load(few clients in parallel) the entire node just freezes completely - even the shell freezes entirely. 经过几分钟的中等负荷(几个并行的客户端)后,整个节点就完全冻结了 - 甚至外壳完全冻结了。

How can this problem get diagnosed? 这个问题如何得到诊断? is there a standard erlang approach for those kind of problems? 对于那些问题,是否有标准的erlang方法? (memory consumption was low ,so its not some kind of memory leak) (内存消耗低,所以它不是某种内存泄漏)

Important Edit 重要编辑

It seems that under werl.exe there is no such problem. 似乎在werl.exe下没有这样的问题。 only under erl.exe . 仅在erl.exe下。 Probably same as in http://erlang.2086793.n4.nabble.com/erl-exe-dies-but-werl-exe-does-not-on-both-Windows-XP-and-2008R2-with-R14B01-td3335030.html 可能与http://erlang.2086793.n4.nabble.com/erl-exe-dies-but-werl-exe-does-not-on-both-Windows-XP-and-2008R2-with-R14B01-相同td3335030.html

If you kill your process with kill -SIGUSR1 <pid> , the erlang VM will generate a erlang crash dump file erl_crash.dump in the directory the app was started. 如果使用kill -SIGUSR1 <pid>进程,则erlang VM将在应用程序启动的目录中生成erlang崩溃转储文件erl_crash.dump

Then you can analyze it using the crash dump viewer . 然后,您可以使用崩溃转储查看器对其进行分析。

A frozen erlang shell can be caused by uncaught exit signals. 冻结的erlang shell可能是由未捕获的退出信号引起的。 You can try to trap exits in the shell process (assuming it is the parent process of your server) which should give you the exit reason. 您可以尝试在shell进程中捕获出口(假设它是您的服务器的父进程),它应该为您提供退出原因。 See Reference manual on Errors 有关错误,请参见参考手册

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM