Zebra searches that take 30+ seconds will return 0 records to Koha, because the ZOOM connection has an I/O timeout that defaults to 30 seconds.
Ideally, your search wouldn't take longer than 30 seconds, but if you do a weighted search that includes a stopword in a database of over 1,000,000 records... it's not uncommon to have this problem.
Created attachment 140881 [details] [review] Bug 31614: Adds a koha-conf.xml config to set Zebra connection timeout This patch adds <zebra_connection_timeout>30</zebra_connection_timeout> to the koha-conf.xml file. Sometimes, a Zebra search might take longer than 30 seconds. If it does, Koha will say that 0 records have been found. While slow searching is not desirable, it's more desirable to get the result set regardless. Test plan: 0. Apply patch 1. Add <zebra_connection_timeout>.1</zebra_connection_timeout> to your relevant koha-conf.xml file (e.g. /etc/koha/sites/kohadev/koha-conf.xml) 2. echo 'flush_all' | nc -q 1 memcached 11211 3. koha-plack --restart kohadev 4. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test 5. Note that no results are returned 6. Change zebra_connection_timeout to 30 7. echo 'flush_all' | nc -q 1 memcached 11211 8. koha-plack --restart kohadev 9a. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test 9b. Note that 3 results are returned 10. Remove zebra_connection_timeout from koha-conf.xml 11. echo 'flush_all' | nc -q 1 memcached 11211 12. koha-plack --restart kohadev 13a. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test 13b. Note that 3 results are returned 14. Celebrate
Created attachment 140965 [details] [review] Bug 31614: Adds a koha-conf.xml config to set Zebra connection timeout This patch adds <zebra_connection_timeout>30</zebra_connection_timeout> to the koha-conf.xml file. Sometimes, a Zebra search might take longer than 30 seconds. If it does, Koha will say that 0 records have been found. While slow searching is not desirable, it's more desirable to get the result set regardless. Test plan: 0. Apply patch 1. Add <zebra_connection_timeout>.1</zebra_connection_timeout> to your relevant koha-conf.xml file (e.g. /etc/koha/sites/kohadev/koha-conf.xml) 2. echo 'flush_all' | nc -q 1 memcached 11211 3. koha-plack --restart kohadev 4. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test 5. Note that no results are returned 6. Change zebra_connection_timeout to 30 7. echo 'flush_all' | nc -q 1 memcached 11211 8. koha-plack --restart kohadev 9a. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test 9b. Note that 3 results are returned 10. Remove zebra_connection_timeout from koha-conf.xml 11. echo 'flush_all' | nc -q 1 memcached 11211 12. koha-plack --restart kohadev 13a. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test 13b. Note that 3 results are returned 14. Celebrate Signed-off-by: David Nind <david@davidnind.com>
Created attachment 141516 [details] [review] Bug 31614: Adds a koha-conf.xml config to set Zebra connection timeout This patch adds <zebra_connection_timeout>30</zebra_connection_timeout> to the koha-conf.xml file. Sometimes, a Zebra search might take longer than 30 seconds. If it does, Koha will say that 0 records have been found. While slow searching is not desirable, it's more desirable to get the result set regardless. Test plan: 0. Apply patch 1. Add <zebra_connection_timeout>.1</zebra_connection_timeout> to your relevant koha-conf.xml file (e.g. /etc/koha/sites/kohadev/koha-conf.xml) 2. echo 'flush_all' | nc -q 1 memcached 11211 3. koha-plack --restart kohadev 4. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test 5. Note that no results are returned 6. Change zebra_connection_timeout to 30 7. echo 'flush_all' | nc -q 1 memcached 11211 8. koha-plack --restart kohadev 9a. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test 9b. Note that 3 results are returned 10. Remove zebra_connection_timeout from koha-conf.xml 11. echo 'flush_all' | nc -q 1 memcached 11211 12. koha-plack --restart kohadev 13a. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test 13b. Note that 3 results are returned 14. Celebrate Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 22.11. Nice work everyone, thanks!
*** Bug 17123 has been marked as a duplicate of this bug. ***