Bug 36898

Summary: Elasticsearch indexer error log needs more information
Product: Koha Reporter: David Cook <dcook>
Component: Searching - ElasticsearchAssignee: Bugs List <koha-bugs>
Status: RESOLVED INVALID QA Contact:
Severity: enhancement    
Priority: P5 - low CC: emmi.takkinen, michaela.sieber
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description David Cook 2024-05-20 01:57:10 UTC
Fairly regularly I'm seeing the following message showing up in /var/log/koha/instance/es-indexer-output.log 

[2024/05/20 09:28:13] [WARN] Update of elastic index failed with: Exception 'Koha::Exceptions::Elasticsearch::BadResponse' thrown 'Bad response received when submitting request to Elasticsearch' with details => [https://hostname:9300]-[599] Timed out while waiting for socket to become ready for reading, type => Timeout
 main::catch {...}  /usr/share/koha/bin/workers/es_indexer_daemon.pl (229)

But this doesn't really tell me anything useful. It's not clear what records failed to update or what the job number was, so there's no way to re-try and fix the missing indexed data.

Also, I've updated the request_timeout from 30 to 60, so it's a fairly long timeout. 

Generally speaking, there was a fair amount of indexing activity, but around 09:27:13 there wasn't. Although there was 6 jobs at 09:28:13, so maybe it's not the request_timeout that needs tweaking...
Comment 1 David Cook 2024-05-20 02:03:00 UTC
"Timed out while waiting for socket to become ready for reading" comes from HTTP::Tiny, which is the HTTP client used by Search::Elasticsearch.

The only direct mention I've found for it is on the Elastic discussion forms for "Elasticsearch - Error Timeout 599". (Not including the link so that Bugzilla doesn't block me.)
Comment 2 David Cook 2024-05-20 02:04:22 UTC
Actually, I forgot I'd also found a mention on the elasticsearch-perl Github for issue "reindex timeout #112"
Comment 3 Katrin Fischer 2024-05-20 19:09:31 UTC
It sounds like the bug description is a bit misleading/sounds too harmless, isn't the real problem here that we are missing records to index?
Comment 4 David Cook 2024-10-22 00:07:20 UTC
Yeah, I think I was barking up the wrong tree here...