aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2017-05-19 15:00:26 +0200
committerSiri Hansen <[email protected]>2017-05-19 15:00:26 +0200
commit209a4f849395e08ef48abb8279729ffe6ab6ace9 (patch)
tree2c26eb3fe3b2e4b8c0c6f41a1c644d27f08d26b3 /lib
parente2f8041652011cef479efd9601e9abddb731932e (diff)
parentaaefd3a001f03f8991983d217e7a7aec945df3a0 (diff)
downloadotp-209a4f849395e08ef48abb8279729ffe6ab6ace9.tar.gz
otp-209a4f849395e08ef48abb8279729ffe6ab6ace9.tar.bz2
otp-209a4f849395e08ef48abb8279729ffe6ab6ace9.zip
Merge branch 'siri/etop/many-procs-timeout/OTP-14393'
* siri/etop/many-procs-timeout/OTP-14393: [etop] Extend timer when fetching process info from node
Diffstat (limited to 'lib')
-rw-r--r--lib/observer/src/etop.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/observer/src/etop.erl b/lib/observer/src/etop.erl
index 925f4456bb..2093e6a0d7 100644
--- a/lib/observer/src/etop.erl
+++ b/lib/observer/src/etop.erl
@@ -180,10 +180,16 @@ stop(Opts) ->
end,
unregister(etop_server).
-update(#opts{store=Store,node=Node,tracing=Tracing}=Opts) ->
+update(#opts{store=Store,node=Node,tracing=Tracing,intv=Interval}=Opts) ->
Pid = spawn_link(Node,observer_backend,etop_collect,[self()]),
Info = receive {Pid,I} -> I
- after 1000 -> exit(connection_lost)
+ after Interval ->
+ %% Took more than the update interval to fetch
+ %% data. Either the connection is lost or the
+ %% fetching took too long...
+ io:format("Timeout when waiting for process info from "
+ "node ~p; exiting~n", [Node]),
+ exit(timeout)
end,
#etop_info{procinfo=ProcInfo} = Info,
ProcInfo1 =