Help Center/ Cloud Data Migration/ FAQs/ Troubleshooting/ What Should I Do If Error "timeout waiting for connection from pool" Is Reported During ES Writing?
Updated on 2023-06-21 GMT+08:00

What Should I Do If Error "timeout waiting for connection from pool" Is Reported During ES Writing?

Symptom

Error "timeout waiting for connection from pool" is reported during ES writing, and the log contains multiple es_rejected_execution_exception fields.

Fault Analysis

On the cerebro page, the index has only one shard. However, when an index with three shards is created, es_rejected_execution_exception is also reported.

It is found that almost all records are written to a shard. The root cause is that hot spots are generated.

Solution

During migration, the user selected a primary key, which replaces _id. The calculated shards belong to the same index.

1. Users are not advised to select the primary key so that ES automatically generates _id. In this way, the obtained hash values are scattered.

2. If the user's application must replace _id with its own primary key, the user is advised to use an ES cluster with better performance.