Re: [Koha] Plack causes permanent CPU load of 100%

2018-01-04 Thread Tomas Cohen Arazi
That's because your repository points to a newer Koha (oldstable?) I
recommend that you use the version number in your config (16.11) and
reinstall libmojolicious-perl and libjson-validator-perl from the repo.

Regards

El jue., 4 de ene. de 2018 11:21 a. m., Michael Kuhn 
escribió:

> Hi
>
> We are running Koha 16.11.01 on Debian GNU/Linux 8 (64-bit).
>
> Since some weeks we see Plack causing an almost permanent CPU load of
> 100% (maybe this happened after a regular update of the Debian Perl
> packages?). The file "/var/log/koha/INSTANCE/plack.log" constantly gets
> lines like the following added:
>
> Error while loading /etc/koha/plack.psgi: Can't load application from
> file "/usr/share/koha/api/v1/app.pl": Can't locate object method
> "cache_dir" via package "Swagger2::SchemaValidator" at
> /usr/share/perl5/Swagger2.pm line 41.
> Compilation failed in require at (eval 1221) line 1.
>
> A restart of the host doesn't solve the problem. For the moment we have
> stopped Plack and deactivated it completely.
>
> Does anyone know what causes this problem and how to solve it?
>
> Best wishes: Michael
> --
> Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
> Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
> T 0041 (0)61 261 55 61 · E m...@adminkuhn.ch · W www.adminkuhn.ch
> ___
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
>
-- 
Tomás Cohen Arazi
Theke Solutions (https://theke.io )
✆ +54 9351 3513384
GPG: B2F3C15F
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Plack causes permanent CPU load of 100%

2018-01-04 Thread Jonathan Druart
you can still use 16.11.x if you want, but the latest, 16.11.15 :)

On Thu, 4 Jan 2018 at 12:36 Michael Kuhn  wrote:

> Hi Jonathan
>
>  > Why 16.11.01? You should upgrade.
>
> Well, the machine is not yet in production but there will be an upgrade
> to Koha 17.11 in the near future (even if we originally planned to stay
> on oldstable...).
>
>  > The Mojolicious version has changed, and maybe the wrong version has
>  > been picked from the packages.
>  > The quick and easy fix would be to comment the "api" lines in the
> psgi file:
>
> Thanks for the quick fix! I just reactivated and started Plack and it
> works like a charm, no more visible load caused by Plack.
>
> Best wishes: Michael
> --
> Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
> Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
> T 0041 (0)61 261 55 61 <+41%2061%20261%2055%2061> · E m...@adminkuhn.ch ·
> W www.adminkuhn.ch
>
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Plack causes permanent CPU load of 100%

2018-01-04 Thread Michael Kuhn

Hi Jonathan

> Why 16.11.01? You should upgrade.

Well, the machine is not yet in production but there will be an upgrade 
to Koha 17.11 in the near future (even if we originally planned to stay 
on oldstable...).


> The Mojolicious version has changed, and maybe the wrong version has
> been picked from the packages.
> The quick and easy fix would be to comment the "api" lines in the 
psgi file:


Thanks for the quick fix! I just reactivated and started Plack and it 
works like a charm, no more visible load caused by Plack.


Best wishes: Michael
--
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E m...@adminkuhn.ch · W www.adminkuhn.ch
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Plack causes permanent CPU load of 100%

2018-01-04 Thread Jonathan Druart
Hi Michael,

Why 16.11.01? You should upgrade.

The Mojolicious version has changed, and maybe the wrong version has been
picked from the packages.
The quick and easy fix would be to comment the "api" lines in the psgi file:

@ plack.psgi:62 @ my $opac = Plack::App::CGIBin->new(
 root => $ENV{DEV_INSTALL}? "$home/opac": "$home/opac/cgi-bin/opac"
 )->to_app;

-my $apiv1  = builder {
-my $server = Mojo::Server::PSGI->new;
-$server->load_app("$home/api/v1/app.pl");
-$server->to_psgi_app;
-};
+#my $apiv1  = builder {
+#my $server = Mojo::Server::PSGI->new;
+#$server->load_app("$home/api/v1/app.pl");
+#$server->to_psgi_app;
+#};

 builder {
 enable "ReverseProxy";
@ plack.psgi:76 @ builder {

 mount '/opac'  => $opac;
 mount '/intranet'  => $intranet;
-mount '/api/v1/app.pl' => $apiv1;
+#mount '/api/v1/app.pl' => $apiv1;

This is for master, but I guess it is more or less the same for 16.11.01

Cheers,
Jonathan

On Thu, 4 Jan 2018 at 11:21 Michael Kuhn  wrote:

> Hi
>
> We are running Koha 16.11.01 on Debian GNU/Linux 8 (64-bit).
>
> Since some weeks we see Plack causing an almost permanent CPU load of
> 100% (maybe this happened after a regular update of the Debian Perl
> packages?). The file "/var/log/koha/INSTANCE/plack.log" constantly gets
> lines like the following added:
>
> Error while loading /etc/koha/plack.psgi: Can't load application from
> file "/usr/share/koha/api/v1/app.pl": Can't locate object method
> "cache_dir" via package "Swagger2::SchemaValidator" at
> /usr/share/perl5/Swagger2.pm line 41.
> Compilation failed in require at (eval 1221) line 1.
>
> A restart of the host doesn't solve the problem. For the moment we have
> stopped Plack and deactivated it completely.
>
> Does anyone know what causes this problem and how to solve it?
>
> Best wishes: Michael
> --
> Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
> Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
> T 0041 (0)61 261 55 61 <+41%2061%20261%2055%2061> · E m...@adminkuhn.ch ·
> W www.adminkuhn.ch
> ___
> Koha mailing list  http://koha-community.org
> Koha@lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
>
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha