rejected execution of coordinating operation [coordinating_and_primary_bytes=92720288, replica_bytes=0, all_bytes=92720288, coordinating_operation_bytes=23180072, max_coordinating_and_primary_bytes=107374182]"}],"type":"es_rejected_execution_exception","reason":"rejected execution of coordinating operation [coordinating_and_primary_bytes=92720288, replica_bytes=0, all_bytes=92720288, coordinating_operation_bytes=23180072, max_coordinating_and_primary_bytes=107374182]
时间: 2024-01-24 08:18:44 浏览: 554
这个错误信息是来自于 Elasticsearch(ES)的,意味着 ES 拒绝执行一个协调操作。该错误通常表示系统资源不足,如内存或 CPU。具体而言,该错误信息显示了请求的操作和已使用的资源,以及 ES 可能允许的最大协调和主要字节数。
为了解决这个问题,你需要增加系统资源(如内存或 CPU)或调整 ES 集群的配置参数,以提高其性能。你可以尝试减少请求的字节数,或者增加集群中的节点来平衡负载。此外,你还可以将请求分割成更小的块,以减轻 ES 集群的负担。建议你查看 ES 的文档,了解如何优化集群性能。
相关问题
cpu_sys_in_millis cpu_user_in_millis merge_threads merge_queue merge_active merge_rejected merge_largest merge_completed bulk_threads bulk_queue bulk_active bulk_rejected bulk_largest bulk_completed warmer_threads warmer_queue warmer_active warmer_rejected warmer_largest warmer_completed get_largest get_completed get_threads get_queue get_active get_rejected index_threads index_queue index_active index_rejected index_largest index_completed suggest_threads suggest_queue suggest_active suggest_rejected suggest_largest suggest_completed fetch_shard_store_queue fetch_shard_store_active fetch_shard_store_rejected fetch_shard_store_largest fetch_shard_store_completed fetch_shard_store_threads management_threads management_queue management_active management_rejected management_largest management_completed percolate_queue percolate_active percolate_rejected percolate_largest percolate_completed percolate_threads listener_active listener_rejected listener_largest listener_completed listener_threads listener_queue search_rejected search_largest search_completed search_threads search_queue search_active fetch_shard_started_threads fetch_shard_started_queue fetch_shard_started_active fetch_shard_started_rejected fetch_shard_started_largest fetch_shard_started_completed refresh_rejected refresh_largest refresh_completed refresh_threads refresh_queue refresh_active optimize_threads optimize_queue optimize_active optimize_rejected optimize_largest optimize_completed snapshot_largest snapshot_completed snapshot_threads snapshot_queue snapshot_active snapshot_rejected generic_threads generic_queue generic_active generic_rejected generic_largest generic_completed flush_threads flush_queue flush_active flush_rejected flush_largest flush_completed server_open rx_count rx_size_in_bytes tx_count tx_size_in_bytes
这些指标是Elasticsearch集群监控指标,包括:
- cpu_sys_in_millis:集群中所有节点的系统CPU使用时间,即内核态时间。
- cpu_user_in_millis:集群中所有节点的用户CPU使用时间,即用户态时间。
- merge_threads/merge_queue/merge_active/merge_rejected/merge_largest/merge_completed:用于合并段(segments)的线程池监控指标。
- bulk_threads/bulk_queue/bulk_active/bulk_rejected/bulk_largest/bulk_completed:用于批量操作的线程池监控指标。
- warmer_threads/warmer_queue/warmer_active/warmer_rejected/warmer_largest/warmer_completed:用于预热索引的线程池监控指标。
- get_largest/get_completed/get_threads/get_queue/get_active/get_rejected:用于处理get请求的线程池监控指标。
- index_threads/index_queue/index_active/index_rejected/index_largest/index_completed:用于处理index请求的线程池监控指标。
- suggest_threads/suggest_queue/suggest_active/suggest_rejected/suggest_largest/suggest_completed:用于处理suggest请求的线程池监控指标。
- fetch_shard_store_queue/fetch_shard_store_active/fetch_shard_store_rejected/fetch_shard_store_largest/fetch_shard_store_completed/fetch_shard_store_threads:用于获取分片数据的线程池监控指标。
- management_threads/management_queue/management_active/management_rejected/management_largest/management_completed:用于管理操作的线程池监控指标。
- percolate_queue/percolate_active/percolate_rejected/percolate_largest/percolate_completed/percolate_threads:用于处理percolate请求的线程池监控指标。
- listener_active/listener_rejected/listener_largest/listener_completed/listener_threads/listener_queue:用于处理请求的监听器监控指标。
- search_rejected/search_largest/search_completed/search_threads/search_queue/search_active:用于处理search请求的线程池监控指标。
- fetch_shard_started_threads/fetch_shard_started_queue/fetch_shard_started_active/fetch_shard_started_rejected/fetch_shard_started_largest/fetch_shard_started_completed:用于获取分片数据的线程池监控指标。
- refresh_rejected/refresh_largest/refresh_completed/refresh_threads/refresh_queue/refresh_active:用于刷新操作的线程池监控指标。
- optimize_threads/optimize_queue/optimize_active/optimize_rejected/optimize_largest/optimize_completed:用于优化操作的线程池监控指标。
- snapshot_largest/snapshot_completed/snapshot_threads/snapshot_queue/snapshot_active/snapshot_rejected:用于快照操作的线程池监控指标。
- generic_threads/generic_queue/generic_active/generic_rejected/generic_largest/generic_completed:用于处理通用请求的线程池监控指标。
- flush_threads/flush_queue/flush_active/flush_rejected/flush_largest/flush_completed:用于刷新操作的线程池监控指标。
- server_open:当前打开的HTTP连接数。
- rx_count/rx_size_in_bytes:接收的HTTP请求数和数据量。
- tx_count/tx_size_in_bytes:发送的HTTP响应数和数据量。
这些指标可以帮助我们监控Elasticsearch集群的运行状态和性能,及时发现并解决潜在的问题。
update mc_tax_apply set rejected_time = null,remark = null where apply_id = 用MyBatisPlus怎么写
使用 MyBatisPlus 进行更新操作可以通过以下步骤实现:
1. 定义实体类
首先需要定义实体类 `McTaxApply`,该类需要继承 `Model` 类,并且定义实体类的属性对应数据库表的字段。
```java
public class McTaxApply extends Model<McTaxApply> {
private Long applyId;
private Date rejectedTime;
private String remark;
// 省略 getter 和 setter 方法
}
```
2. 定义 Mapper 接口
接下来需要定义 Mapper 接口 `McTaxApplyMapper`,该接口需要继承 `BaseMapper` 接口,并且定义更新操作的方法。
```java
public interface McTaxApplyMapper extends BaseMapper<McTaxApply> {
int updateRejectedTimeAndRemarkById(@Param("applyId") Long applyId,
@Param("rejectedTime") Date rejectedTime,
@Param("remark") String remark);
}
```
其中 `@Param` 注解用于指定参数名称,方便在 SQL 语句中使用。
3. 定义 SQL 语句
在 XML 文件中定义 SQL 语句,该语句需要使用 MyBatisPlus 提供的 `UpdateWrapper` 来进行更新操作。
```xml
<update id="updateRejectedTimeAndRemarkById">
update mc_tax_apply
<set>
<if test="rejectedTime != null">
rejected_time = #{rejectedTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where apply_id = #{applyId,jdbcType=BIGINT}
</update>
```
4. 调用更新方法
在代码中调用更新方法,实现更新操作。
```java
McTaxApply mcTaxApply = new McTaxApply();
mcTaxApply.setApplyId(1L);
mcTaxApply.setRejectedTime(null);
mcTaxApply.setRemark(null);
McTaxApplyMapper mcTaxApplyMapper = sqlSession.getMapper(McTaxApplyMapper.class);
int result = mcTaxApplyMapper.update(mcTaxApply, new UpdateWrapper<McTaxApply>()
.eq("apply_id", mcTaxApply.getApplyId())
.set("rejected_time", mcTaxApply.getRejectedTime())
.set("remark", mcTaxApply.getRemark()));
```
以上代码中,我们首先创建了一个 `McTaxApply` 对象,并设置了需要更新的字段。然后通过 `SqlSession` 获取 `McTaxApplyMapper` 接口的实现类,并调用更新方法。在更新方法中,我们使用 `UpdateWrapper` 来构造更新条件和更新字段,并通过 `eq` 方法指定更新条件为 `apply_id = ?`。最后执行更新操作,并返回更新结果。
阅读全文