Hindsight become stuck without error info
ruiaylin opened this issue · comments
ENV
OS Version : CentOS Linux release 7.4.1708 (Core)
Hindsight : hindsight-0.15.0-1.x86_64.rpm
Sandbox : luasandbox-1.3.2-1.x86_64.rpm
DESC
I using lpeg and tail.lua to handle mysql slow logs , and send the heka message to kafka.
config:
output_path = "output"
output_size = 1024 * 1024 * 1024
sandbox_load_path = nil -- disable dynamic loading
sandbox_run_path = "slow"
analysis_threads = 1
analysis_lua_path = "/usr/local/lib/luasandbox/modules/?.lua;/usr/lib64/luasandbox/modules/?.lua"
analysis_lua_cpath = "/usr/local/lib/luasandbox/modules/?.so;/usr/lib64/luasandbox/modules/?.so"
io_lua_path = analysis_lua_path .. ";/usr/local/lib/luasandbox/io_modules/?.lua;/usr/lib64/luasandbox/io_modules/?.lua"
io_lua_cpath = analysis_lua_cpath .. ";/usr/local/lib/luasandbox/io_modules/?.so;/usr/lib64/luasandbox/io_modules/?.so"
max_message_size = 1024 * 1024 * 8
analysis_defaults = {
output_limit = 1024 * 64, -- default
memory_limit = 1024 * 1024 * 8, -- default
instruction_limit = 1000000, -- default
preserve_data = false, -- default
ticker_interval = 60,
}
input_defaults = {
output_limit = 1024 * 1024 * 8,
instruction_limit = 0,
}
output_defaults = {
output_limit = 1024 * 1024 * 8,
ticker_interval = 60,
preserve_data = true,
}
I use the command bellow to start hindsight :
hindsight test.cfg 7
1559713574273860293 [debug] input_reader output.kafka opened file: output/input/3.log offset: 555970916
1559713574273917264 [debug] input_reader output.kafka opened file: output/analysis/0.log
1559713574544136305 [info] input.slowsql detaching received: 0 msg:
It works all right . But hindsight just handle the old messages in the slow log file .
the message generate can't be handled continually , It was very strange.
If i restart hindsight, it can do the messages from last point and then the handle stoped ( hindsight do not exit).
I do not know the reason at all .
The slowsql in configured to exit on the EOF.
1559713574544136305 [info] input.slowsql detaching received: 0 msg:
Set the ticker_interval to 1 in that input cfg as documented here: http://mozilla-services.github.io/lua_sandbox/heka/input.html#Polling there is also an example here: http://mozilla-services.github.io/hindsight/tutorials/cookbooks.html#MySQL_Slow_Query_Log
The regular version of hindsight does not automatically shutdown when all inputs have completed (that is a feature of hindsight_cli), this is expected behavior. Normally with dynamic loading disabled you would use shutdown_on_terminate = true in the input configuration if it was considered mission critical see: http://mozilla-services.github.io/hindsight/configuration.html
@trink Thanks