This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded | |
(v)ersion (k)ill (D)b-tables (d)istribution | |
^C | |
bash-3.2$ make console | |
expr: syntax error | |
ERL_LIBS=apps:deps erl -args_file rels/files/vm.args -config rels/files/sys.config -eval \ | |
'[ok = application:ensure_started(A, permanent) || A <- [kernel,stdlib,mnesia,sasl,kvs,fs,active]]' | |
Erlang/OTP 17 [erts-6.0] [source] [64-bit] [smp:4:4] [async-threads:5] [hipe] [kernel-poll:true] | |
Eshell V6.0 (abort with ^G) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat ~/.kerlrc | |
KERL_CONFIGURE_OPTIONS="--enable-threads --enable-smp-support --enable-m64-build --without-javac --enable-kernel-poll" | |
$ cat vm.args | |
-name [email protected] | |
+K true | |
+A 5 | |
-env ERL_MAX_PORTS 4096 | |
-env ERL_FULLSWEEP_AFTER 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ car .applist | |
[crypto,syntax_tools,compiler,mnesia,kernel,stdlib,kvs,mqs,ranch,cowlib,goldrush,protobuffs,cowboy,riak_pb,rest,jsone,umca,amqp_client,lager,meck,poolboy,rabbit_common,riakc,riakc_wrapper] | |
$ cat ~/.kerlrc | |
KERL_CONFIGURE_OPTIONS="--enable-threads --enable-smp-support --enable-m64-build --without-javac --enable-kernel-poll" | |
$ cat vm.args | |
-name [email protected] | |
+K true | |
+A 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello! | |
tl;dr We’ve managed to put beam.smp in crash reproducibly. | |
It is resistant to reproduce on 17.3 and 16B02 versions. | |
It happens under heavy load. No HiPE. No NIFs. ulimit is ok. | |
We have very simple application that consumes RabbitMQ queue and store data in mnesia's disc_copies. For that purposes we use RabbitMQ client stack amqp_client/rabbit_common wrapped in our simple library synrc/mqs (300 LOC) along with very simple wrapper over mnesia synrc/kvs (200 LOC). We have 16GB RAM on powerful machine and performance is good. However after reaching memory consumption near 10GB the system goes to core. We used the original Ubuntu 12.04 package R16B02 which was without symbol information needed to bug report. So we’ve built with KERL Erlang 17.3 from sources and situation hadn’t change. | |
Here is GBD session we did retrieve from core file along with detailed information about application, build procedure, etc.: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main()-> #button{postback=validated}. | |
event(init) -> wf:reg(wf:peer(?REQ)). | |
event(validated) -> wf:wire("show spinner"), wf:async(fun() -> loop() end). | |
loop() -> do_extensive_work(), wf:wire("hide spinner"), wf:flush(wf:peer(?REQ)). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
event(validated) -> wf:wire("show spinner"), self() ! {direct,hide}. | |
event(hide) -> do_extensive_work(), wf:wire("hide spinner"). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-define(IS_ALPHA(C), | |
(C =:= $a) or (C =:= $b) or (C =:= $c) or (C =:= $d) or (C =:= $e) or | |
(C =:= $f) or (C =:= $g) or (C =:= $h) or (C =:= $i) or (C =:= $j) or | |
(C =:= $k) or (C =:= $l) or (C =:= $m) or (C =:= $n) or (C =:= $o) or | |
(C =:= $p) or (C =:= $q) or (C =:= $r) or (C =:= $s) or (C =:= $t) or | |
(C =:= $u) or (C =:= $v) or (C =:= $w) or (C =:= $x) or (C =:= $y) or | |
(C =:= $z) or | |
(C =:= $A) or (C =:= $B) or (C =:= $C) or (C =:= $D) or (C =:= $E) or | |
(C =:= $F) or (C =:= $G) or (C =:= $H) or (C =:= $I) or (C =:= $J) or | |
(C =:= $K) or (C =:= $L) or (C =:= $M) or (C =:= $N) or (C =:= $O) or |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(iso8601). | |
-compile(export_all). | |
-define(ISO_8601_DATETIME_FORMAT, "Y-m-dTG:i:sZ"). | |
-define(ISO_8601_DATETIME_WITH_MS_FORMAT, "Y-m-dTG:i:s.fZ"). | |
format(Format) -> format(Format, calendar:universal_time(),[]). | |
format(Format, {_,_,Ms}=Now) -> {Date,{H,M,S}} = calendar:now_to_datetime(Now), format(Format, {Date, {H,M,S,Ms}}, []); | |
format(Format, Date) -> format(Format, Date, []). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to install: $ npm install ws | |
// to run: $ node health.js | |
var WebSocket = require('ws'); | |
var ws = new WebSocket('wss://deposits.privatbank.ua/ws/static/app/open.htm'); | |
ws.on('open', function open() { console.log('ok'); ws.send('N2O,'); }); | |
ws.on('close', function close() { console.log('closed'); }); | |
ws.on('message', function message(data, flags) { | |
console.log('Data'); | |
console.log(data); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ tcpkali -m "N2O," --latency-marker "console.log" -c20 --ws 127.0.0.1:8877/ws/static/app/open.htm | |
Destination: [127.0.0.1]:8877 | |
Ramped up to 20 connections. | |
Total data sent: 10.6 MiB (11122044 bytes) | |
Total data received: 58.9 MiB (61750840 bytes) | |
Bandwidth per channel: 2.914 Mbps, 364.3 kBps | |
Aggregate bandwidth: 49.386↓, 8.895↑ Mbps | |
Latency at percentiles: 9318.3/9945.5/10035.1 (95/99/99.5%) | |
Mean and max latencies: 4448.3/10156.7 (mean/max) |