Issue #80 invalid

Error 500 after bibliosearch

Marcus Bautze
created an issue

Hi, i have a problem with the bibliosearch at 0.7.1 When i'm search for a biblio (not for a barcode, only with text) sometimes (and not every time) i get a Internal Server Error 500 after a waiting time of 45 seconds. I searched on my server and found out, that sometimes the mysql-process get a cpu-usage of 99,9% after this searchquery (only on bibliosearch) and so the fcgi stops this searchquery after 45 seconds. But now my question. Why the search makes 99,9% cpu-usage for mysql, has anyone an idea?

Larian

Comments (9)

  1. Hans van der Weij

    Hello Marcus,

    Were you using the default search type Keyword? After getting an Internal Server Error and repeating the search with identical Search Phrase, do you get the expected Search Results? How long does it take usually before Search Results show? What is the number of rows in the biblio_field table?

    About CPU usage: compared to older versions 0.7.1 returns better search results, but the downside is that the queries launched by BiblioSearchQuery.php can be very demanding. I have seen something like 99,9% on my very old / slow Windows system, Linux seems to be more responsive. But search should never take more than a couple of seconds for a couple of thousand bibliographies.

  2. Marcus Bautze reporter

    Hallo Hans, The system is al linux-system but a virtual server (2GB guaranteed, 4 GB dynamic, but no CPU dedicated). It's using mysql 5.1. When the search isn't working and i go back after that and searching for the same word it's working. When i'm searching for no word it's working every time. When i'm searching for a word where i got a result, i will get a result every search (cache is working). When the search is working (without cache) it's need about 5 seconds. In the database are about 2500 biblios and 2850 biblio_copys. The problem is on the opac-search and at the search in calaoging.

  3. Marcus Bautze reporter

    Ok, found out: if i'm increasing fcgi-timeout to 60 seconds i get a result. Now i changed the search for title to selected, there is no high usage and so the users have to select the keyword-search to produce this high usage.

    Thank you

  4. Hans van der Weij

    Correct workaround. Title search does not join the biblio_field table, so it should be faster.

    I would expect results from Keyword search for 2500 biblios in about one second, not 5 seconds. There must be an issue with the database.

  5. Hans van der Weij

    Examining the database learned that in tables biblio_copy and biblio_field the order of the fields in the primary index was reversed. Wow! The effect on performance is dramatic... After reverting the primary indexes back to original, performance is normal.

  6. Log in to comment