Error with showlog


(Rirouxe) #1

Hello

with thruk 2.24-2 in centos 7 i have this error :

[Tue Nov 13 18:53:27.933957 2018] [fcgid:warn] [pid 33523] mod_fcgid: cleanup zombie process 68717
ERROR: got signal ALRM while handling request, possible timeout in https://server/thruk/cgi-bin/showlog.cgi?host=host&service=service
ERROR: User: user
ERROR: Address: ip
ERROR: Parameters: {‘host’ => ‘host’,‘service’ => ‘service’};
ERROR: Stacktrace:
at /usr/share/thruk/lib/Thruk.pm line 611.
Thruk::ANON(‘ALRM’) called at /usr/share/thruk/lib/Thruk/Backend/Provider/Mysql.pm line 1520
eval {…} called at /usr/share/thruk/lib/Thruk/Backend/Provider/Mysql.pm line 1520
Thruk::Backend::Provider::Mysql::_get_plugin_lookup(‘DBI::db=HASH(0x58cc3d8)’, ‘866a5’) called at /usr/share/thruk/lib/Thruk/Backend/Provider/Mysql.pm line 1126
eval {…} called at /usr/share/thruk/lib/Thruk/Backend/Provider/Mysql.pm line 1121
Thruk::Backend::Provider::Mysql::_update_logcache(‘Thruk::Backend::Provider::Mysql=HASH(0x52ed9b0)’, ‘Thruk::Context=HASH(0x4a77790)’, ‘update’, ‘Thruk::Backend::Peer=HASH(0x2bb7bb8)’, ‘DBI::db=HASH(0x58cc3d8)’, ‘866a5’, 0, undef, ‘ARRAY(0x5abe468)’, …) called at /usr/share/thruk/lib/Thruk/Backend/Provider/Mysql.pm line 1052
eval {…} called at /usr/share/thruk/lib/Thruk/Backend/Provider/Mysql.pm line 1051
Thruk::Backend::Provider::Mysql::_import_logs(‘Thruk::Backend::Provider::Mysql=HASH(0x52ed9b0)’, ‘Thruk::Context=HASH(0x4a77790)’, ‘update’, 0, ‘866a5’) called at /usr/share/thruk/lib/Thruk/Backend/Provider/Livestatus.pm line 1535
Thruk::Backend::Provider::Livestatus::renew_logcache(‘Thruk::Backend::Provider::Livestatus=HASH(0x2b9ab78)’, ‘Thruk::Context=HASH(0x4a77790)’, 0) called at /usr/share/thruk/lib/Thruk/Backend/Pool.pm line 265
eval {…} called at /usr/share/thruk/lib/Thruk/Backend/Pool.pm line 264
Thruk::Backend::Pool::do_on_peer(‘866a5’, ‘renew_logcache’, ‘ARRAY(0x46e2e50)’) called at /usr/share/thruk/lib/Thruk/Backend/Manager.pm line 1839
Thruk::Backend::Manager::_get_result_serial(‘Thruk::Backend::Manager=HASH(0x44b3e08)’, ‘ARRAY(0x58eed90)’, ‘renew_logcache’, ‘ARRAY(0x46e2e50)’) called at /usr/share/thruk/lib/Thruk/Backend/Manager.pm line 1729
Thruk::Backend::Manager::_get_result(‘Thruk::Backend::Manager=HASH(0x44b3e08)’, ‘ARRAY(0x58eed90)’, ‘renew_logcache’, ‘ARRAY(0x46e2e50)’, 1) called at /usr/share/thruk/lib/Thruk/Backend/Manager.pm line 1461
Thruk::Backend::Manager::_do_on_peers(‘Thruk::Backend::Manager=HASH(0x44b3e08)’, ‘renew_logcache’, ‘ARRAY(0x46e2e50)’, 1) called at /usr/share/thruk/lib/Thruk/Backend/Manager.pm line 987
Thruk::Backend::Manager::_renew_logcache(‘Thruk::Backend::Manager=HASH(0x44b3e08)’, ‘Thruk::Context=HASH(0x4a77790)’, 0) called at /usr/share/thruk/lib/Thruk/Backend/Manager.pm line 886
eval {…} called at /usr/share/thruk/lib/Thruk/Backend/Manager.pm line 885
Thruk::Backend::Manager::renew_logcache(‘Thruk::Backend::Manager=HASH(0x44b3e08)’, ‘Thruk::Context=HASH(0x4a77790)’) called at /usr/share/thruk/lib/Thruk/Controller/showlog.pm line 129
Thruk::Controller::showlog::index(‘Thruk::Context=HASH(0x4a77790)’, ‘/thruk/cgi-bin/showlog.cgi’) called at /usr/share/thruk/lib/Thruk.pm line 330
eval {…} called at /usr/share/thruk/lib/Thruk.pm line 320
Thruk::_dispatcher(‘HASH(0x4a77658)’) called at /usr/lib64/thruk/perl5/Plack/Util.pm line 145
eval {…} called at /usr/lib64/thruk/perl5/Plack/Util.pm line 145
Plack::Util::run_app(‘CODE(0x3b7a198)’, ‘HASH(0x4a77658)’) called at /usr/lib64/thruk/perl5/Plack/Handler/FCGI.pm line 145
Plack::Handler::FCGI::run(‘Plack::Handler::FCGI=HASH(0x2291c48)’, ‘CODE(0x3b7a198)’) called at /usr/share/thruk/script/thruk_fastcgi.pl line 24

when i click on logs with this link => View Alert History For This Service (Logs)

if I refresh the page sometimes I get the logs, sometimes no

Thanks


(Rirouxe) #2

when i disable API the problem is no longer present


(Sven Nierlein) #3

this error does not seem to be related to the API. It just says it took to long to fetch the logfiles. If you have a large number of logfiles, using the logcache might help: https://thruk.org/documentation/logfile-cache.html


(Rirouxe) #4

hello

log cache is already is currently used. at the time of the event nothing in logcache log :

[Tue Nov 13 18:50:02 2018][INFO][server] running update for site BACKEND1
[Tue Nov 13 18:50:02 2018][INFO][server] running update for site BACKEND3
[Tue Nov 13 18:50:02 2018][INFO][server] latest entry in logcache: Sat Aug 25 03:54:39 2018
[Tue Nov 13 18:50:02 2018][INFO][server] importing Sat Aug 25 03:54:39 2018
[Tue Nov 13 18:50:02 2018][INFO][server] until latest entry in logfile: Sat Aug 25 03:54:39 2018
[Tue Nov 13 18:50:02 2018][INFO][server] Sat Aug 25 03:54:39 2018. 0 entries added
[Tue Nov 13 18:50:02 2018][INFO][server] OK - imported 0 log items from 1 site successfully in 0.11s (0/s)
[Tue Nov 13 18:50:02 2018][INFO][server] running update for site BACKEND2
[Tue Nov 13 18:50:02 2018][INFO][server] latest entry in logcache: Tue Nov 13 18:49:36 2018
[Tue Nov 13 18:50:02 2018][INFO][server] importing Tue Nov 13 18:49:36 2018
[Tue Nov 13 18:50:02 2018][INFO][server] until latest entry in logfile: Tue Nov 13 18:49:36 2018
[Tue Nov 13 18:50:02 2018][INFO][server] Tue Nov 13 18:49:36 2018. 0 entries added
[Tue Nov 13 18:50:03 2018][INFO][server] OK - imported 0 log items from 1 site successfully in 0.34s (0/s)
[Tue Nov 13 18:50:07 2018][INFO][server] logcache update already running with pid 68199
[Tue Nov 13 18:50:07 2018][INFO][server]
[Tue Nov 13 18:55:02 2018][INFO][server] running update for site BACKEND1
[Tue Nov 13 18:55:02 2018][INFO][server] running update for site BACKEND3
[Tue Nov 13 18:55:02 2018][INFO][server] latest entry in logcache: Sat Aug 25 03:54:39 2018
[Tue Nov 13 18:55:02 2018][INFO][server] importing Sat Aug 25 03:54:39 2018
[Tue Nov 13 18:55:02 2018][INFO][server] until latest entry in logfile: Sat Aug 25 03:54:39 2018
[Tue Nov 13 18:55:02 2018][INFO][server] Sat Aug 25 03:54:39 2018. 0 entries added
[Tue Nov 13 18:55:02 2018][INFO][server] OK - imported 0 log items from 1 site successfully in 0.10s (0/s)
[Tue Nov 13 18:55:02 2018][INFO][server] running update for site BACKEND2
[Tue Nov 13 18:55:02 2018][INFO][server] latest entry in logcache: Tue Nov 13 18:52:05 2018
[Tue Nov 13 18:55:02 2018][INFO][server] importing Tue Nov 13 18:52:05 2018
[Tue Nov 13 18:55:02 2018][INFO][server] until latest entry in logfile: Tue Nov 13 18:52:05 2018
[Tue Nov 13 18:55:02 2018][INFO][server] Tue Nov 13 18:52:05 2018. 0 entries added


(Sven Nierlein) #5

you could disable the on-demand logcache update logcache_delta_updates = 0


(Rirouxe) #6

ok more error since adding this option. Before this version I did not need it.
Thank you