Better Error Messaging for Users when docker-compose up
Fails
#2399
Labels
P2
Medium priority, add to the next sprint if no P1 available
topic:docker
topic:rest_api
type:documentation
Improvements on the docs
type:feature
New feature or request
Is your feature request related to a problem? Please describe.
I was running
docker-compose up
on a Macbook Pro. Docker Desktop was allotted 4GB of memory. The REST API would continually fail to load theElasticsearchDocumentStore
and hence also theRetriever
. The Elasticsearch instance would keep starting, crashing and restarting. There was no error message as to why this was happening.After some deep exploration with @tstadel , we found that this machine was able to start up the REST API and the Elasticsearch containers separately. But when started up together using
docker-compose up
, the Elasticsearch container would crash because of insufficient memory. Since therestart: on-failure
is set indocker-compose.yml
it would keep trying to restart.After we changed the restart policy to:
Error code 137 would be returned when ES crashed.
Calling
docker container inspect haystack_elasticsearch_1
after crash might show "State"/"OOMKilled": trueDescribe the solution you'd like
It would be great to have some kind of error message displayed to the user about why
docker-compose up
is not working in this situation. It would also be good to explain that you might need to allot more memory to Docker to ensure the containers don't crash, and that you can also change the number of workers to reduce memory consumption.The text was updated successfully, but these errors were encountered: