mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Remove watchdog
This watchdog thread watching is currently unused and bugged in some context, this PR remove any mention of it. Ref #3828 Fixes #3830
This commit is contained in:
parent
ae4c49be3b
commit
9242ae551b
6 changed files with 0 additions and 66 deletions
|
@ -18,11 +18,6 @@ Logstash has the following flags. You can use the `--help` flag to display this
|
|||
-w, --filterworkers COUNT
|
||||
Sets the number of filter workers to run (default: 1)
|
||||
|
||||
--watchdog-timeout TIMEOUT
|
||||
Set watchdog timeout value in seconds. Default is 10. This timeout is used to detect
|
||||
stuck filters; stuck filters usually symptoms of bugs. When a filter takes longer than
|
||||
TIMEOUT seconds, it will cause Logstash to abort.
|
||||
|
||||
-l, --log FILE
|
||||
Log to a given path. Default is to log to stdout
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@ default. If no output is specified, 'stdout { debug => true }}' is
|
|||
default. </dd>
|
||||
<dt> -w, --filterworkers COUNT </dt>
|
||||
<dd> Run COUNT filter workers (default: 1) </dd>
|
||||
<dt> --watchdog-timeout TIMEOUT </dt>
|
||||
<dd> Set watchdog timeout value in seconds. Default is 10.</dd>
|
||||
<dt> -l, --log FILE </dt>
|
||||
<dd> Log to a given path. Default is to log to stdout </dd>
|
||||
<dt> --verbose </dt>
|
||||
|
|
|
@ -23,10 +23,6 @@ class LogStash::Agent < Clamp::Command
|
|||
I18n.t("logstash.agent.flag.filterworkers"),
|
||||
:attribute_name => :filter_workers, :default => 1, &:to_i
|
||||
|
||||
option "--watchdog-timeout", "SECONDS",
|
||||
I18n.t("logstash.agent.flag.watchdog-timeout"),
|
||||
:default => 10, &:to_f
|
||||
|
||||
option ["-l", "--log"], "FILE",
|
||||
I18n.t("logstash.agent.flag.log"),
|
||||
:attribute_name => :log_file
|
||||
|
|
|
@ -97,18 +97,6 @@ class LogStash::Plugin
|
|||
return "#{self.class.name}: #{@params}"
|
||||
end
|
||||
|
||||
protected
|
||||
def update_watchdog(state)
|
||||
Thread.current[:watchdog] = Time.now
|
||||
Thread.current[:watchdog_state] = state
|
||||
end
|
||||
|
||||
protected
|
||||
def clear_watchdog
|
||||
Thread.current[:watchdog] = nil
|
||||
Thread.current[:watchdog_state] = nil
|
||||
end
|
||||
|
||||
public
|
||||
def inspect
|
||||
if !@params.nil?
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
# encoding: utf-8
|
||||
require "logstash/namespace"
|
||||
require "logstash/logging"
|
||||
|
||||
class LogStash::ThreadWatchdog
|
||||
attr_accessor :logger
|
||||
attr_accessor :threads
|
||||
|
||||
class TimeoutError < StandardError; end
|
||||
|
||||
public
|
||||
def initialize(threads, watchdog_timeout=10)
|
||||
@threads = threads
|
||||
@watchdog_timeout = watchdog_timeout
|
||||
end # def initialize
|
||||
|
||||
public
|
||||
def watch
|
||||
while sleep(1)
|
||||
cutoff = Time.now - @watchdog_timeout
|
||||
@threads.each do |t|
|
||||
watchdog = t[:watchdog]
|
||||
if watchdog and watchdog <= cutoff
|
||||
age = Time.now - watchdog
|
||||
@logger.fatal("thread watchdog timeout",
|
||||
:thread => t,
|
||||
:backtrace => t.backtrace,
|
||||
:thread_watchdog => watchdog,
|
||||
:age => age,
|
||||
:cutoff => @watchdog_timeout,
|
||||
:state => t[:watchdog_state])
|
||||
raise TimeoutError, "watchdog timeout"
|
||||
end
|
||||
end
|
||||
end
|
||||
end # def watch
|
||||
end # class LogStash::ThreadWatchdog
|
|
@ -153,12 +153,6 @@ en:
|
|||
Check configuration for valid syntax and then exit.
|
||||
filterworkers: |+
|
||||
Sets the number of filter workers to run.
|
||||
watchdog-timeout: |+
|
||||
Set the filter watchdog timeout (in seconds).
|
||||
This timeout is used to detect stuck filters;
|
||||
stuck filters usually symptoms of bugs.
|
||||
When a filter takes longer than TIMEOUT
|
||||
seconds, it will cause logstash to abort.
|
||||
log: |+
|
||||
Write logstash internal logs to the given
|
||||
file. Without this flag, logstash will emit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue