Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:489: Inside #if 0
   // SIGTERM or SIGINT to the start script (which include the stop    // action of the init.d script).    if (mixed err = catch {    if (exit_code && !once_mode)    report_notice("Restarting Roxen.\n");    else    report_notice("Shutting down Roxen.\n");    })    werror (describe_backtrace (err));   #endif -  destruct(main_logger); +     roxenloader.real_exit( exit_code ); // Now we die...   }      private int shutdown_recurse;      // Shutdown Roxen   // exit_code = 0 True shutdown   // exit_code = -1 Restart   private void low_shutdown(int exit_code)   {
Roxen.git/server/base_server/roxen.pike:874:    THREAD_WERR(sprintf("Handle thread [%O] calling %s",    id, debug_format_queue_task (h)));    set_locale();    busy_threads++;    thread_flagged_as_busy = 1;    handler_num_runs++;       int start_hrtime = gethrtime();    thread_task_start_times[this_thread()] = start_hrtime;    -  mapping log_entry = ([ -  "thread_id" : sprintf("0x%X", this_thread()->id_number()), -  "event" : "BEGIN_HANDLE", -  "hrtime" : start_hrtime, -  ]); -  -  object tmp = functionp(h[0]) && function_object(h[0]); -  if (tmp && has_index(tmp, "request_uuid")) { -  log_entry->rid = tmp->request_uuid; -  } -  main_logger->log(log_entry); -  +     float handler_vtime = gauge {   #ifndef NO_SLOW_REQ_BT    if (h[0] != bg_process_queue &&    // Leave out bg_process_queue. It makes a timeout on    // every individual job instead.    (monitor = slow_req_monitor) && slow_req_timeout > 0.0) {    call_out = monitor->call_out (dump_slow_req, slow_req_timeout,    this_thread(), slow_req_timeout);    h[0](@h[1]);    monitor->remove_call_out (call_out);    }    else   #endif    {    h[0](@h[1]);    }    };    int end_hrtime = gethrtime(); -  log_entry->event = "END_HANDLE"; -  log_entry->hrtime = end_hrtime; -  log_entry->real_time = end_hrtime - start_hrtime; -  main_logger->log(log_entry); +        float handler_rtime = (end_hrtime - start_hrtime)/1E6;    thread_task_start_times[this_thread()] = 0;       h=0;    busy_threads--;    thread_flagged_as_busy = 0;    if (handler_rtime > 0.01) handler_num_runs_001s++;    if (handler_rtime > 0.05) handler_num_runs_005s++;    if (handler_rtime > 0.15) handler_num_runs_015s++;