You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
today i write a demo, i just execute muti_sql with 40000 sqls, but the same job do twice, why?
i guess when the job time exceed 70s, it ocurrs.
lua script is:
function _M.perform(job)
-- job is an instance of Qless_Job and provides access to
-- job.data (which is a Lua table), a means to cancel the
-- job (job:cancel()), and more.
-- return "nil, err_type, err_msg" to indicate an unexpected failure
if not job.data then
return nil, "job-error", "data missing"
end
utils.print_err_format("job perform start........... workerid = %s, len=%s", ngx.worker.id(), #job.data)
-- Do work
local sqls = utils.string_join("\n", job.data)
local ret, err = db_utils:execute_sql("", sqls, true)
if err then
utils.print_err_format("err %s", tostring(err))
end
utils.print_err_format("job perform end workerid = %s", ngx.worker.id())
if ret then
utils.print_err_format("last insert_id = %s", ret.insert_id)
end
today i write a demo, i just execute muti_sql with 40000 sqls, but the same job do twice, why?
i guess when the job time exceed 70s, it ocurrs.
lua script is:
function _M.perform(job)
-- job is an instance of Qless_Job and provides access to
-- job.data (which is a Lua table), a means to cancel the
-- job (job:cancel()), and more.
end
my log is:
2018/10/16 18:05:36 [error] 27659#27659: *1317 [lua] utils.lua:465: print_err_format(): job perform start........... workerid = 0, len=40000, context: ngx.timer
2018/10/16 18:06:46 [error] 27659#27659: *2445 [lua] utils.lua:465: print_err_format(): job perform start........... workerid = 0, len=40000, context: ngx.timer
2018/10/16 18:07:25 [error] 27659#27659: *1317 [lua] utils.lua:465: print_err_format(): job perform end workerid = 0, context: ngx.timer
2018/10/16 18:07:25 [error] 27659#27659: *1317 [lua] utils.lua:465: print_err_format(): last insert_id = 919109, context: ngx.timer
The text was updated successfully, but these errors were encountered: