Bug 16309 - opac-image.pl makes cpu 100%
Summary: opac-image.pl makes cpu 100%
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 15342
  Show dependency treegraph
 
Reported: 2016-04-20 13:04 UTC by Hugo Agud
Modified: 2017-06-14 22:11 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Agud 2016-04-20 13:04:38 UTC
We have seen that activating koha local cover in koha 3.22.5 and plack disabled, for every search koha launches several opac-image.pl but keeps live between 6 and 20 seconds and make cpu crash.

If plack is enabled, erverything works fine.
Comment 1 Jacek Ablewicz 2016-04-21 06:39:47 UTC
(In reply to Hugo Agud from comment #0)
> We have seen that activating koha local cover in koha 3.22.5 and plack
> disabled, for every search koha launches several opac-image.pl but keeps
> live between 6 and 20 seconds and make cpu crash.
> 
> If plack is enabled, erverything works fine.

opac/opac-image.pl is slower in 3.22 than it was in 3.20 (about 4x slower on average, since Bug 13967 - it triggers DBIx class loading on "OPACLocalCoverImages" system preference fetch, i.e. adding 500+ msec to each opac-image.pl invocation). But it's hard to imagine it can actually cause server to crash - unless it's some seriously underpowered kind of setup (virtual machine with only a couple of relatively slow CPU cores assigned)?

Apart from switching to plack - another workaround would be setting up memcached as a Koha cache system (that works in current master, not sure about 3.22.x branch).
Comment 2 Hugo Agud 2016-04-21 11:25:50 UTC
You're right is a small server, but is not a production one, just for testing purpouses.. it has only 4 covers in biblioimages.

And after one search cpu load aveage increase up to 4 .. it has just one moder cpu 3,3 ghz.

We have other servers with older versions of koha with thousands of images and has not problem with opac-image.pl, we have just seen in 3.22, as we just wished to point it, just in case othe koha installations suffer the same problem.

thanks for the answer and the links to the related bugs