Bug 16309

Summary: opac-image.pl makes cpu 100%
Product: Koha Reporter: Hugo Agud <hagud>
Component: SearchingAssignee: Galen Charlton <gmcharlt>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: abl, jonathan.druart, mtj
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15350
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16079
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 15342    

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