# ANALYZE operation causes a large number of write failures

**URL:** https://community.cratedb.com/t/analyze-operation-causes-a-large-number-of-write-failures/645
**Category:** CrateDB
**Created:** [April 20, 2021, 4:55am UTC](https://community.cratedb.com/t/analyze-operation-causes-a-large-number-of-write-failures/645 "2021-04-20T04:55:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![lijiangt](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/lijiangt/32/282_2.png) [@lijiangt](https://community.cratedb.com/u/lijiangt)
#### Post date: [April 20, 2021, 4:55am UTC](https://community.cratedb.com/t/analyze-operation-causes-a-large-number-of-write-failures/645/1 "2021-04-20T04:55:30Z")

</div>

When I run ANALYZE at more than 11 o’clock every night, it will be unstable for about a minute, and hundreds of write failures will occur. Later, I modified it to execute once every 48 hours, and it failed more every time I executed it.  
Can I control the resources used by ANALYZE? Or is there any way to solve it?

---

<div class="post-metadata">

### Author: ![proddata](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/proddata/32/1379_2.png) [@proddata](https://community.cratedb.com/u/proddata)
#### Post date: [April 20, 2021, 6:58am UTC](https://community.cratedb.com/t/analyze-operation-causes-a-large-number-of-write-failures/645/2 "2021-04-20T06:58:47Z")

</div>

Can you maybe share some more info on your current setup?  
Which CrateDB version are you using?

---

<div class="post-metadata">

### Author: ![lijiangt](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/lijiangt/32/282_2.png) [@lijiangt](https://community.cratedb.com/u/lijiangt)
#### Post date: [April 20, 2021, 9:19am UTC](https://community.cratedb.com/t/analyze-operation-causes-a-large-number-of-write-failures/645/3 "2021-04-20T09:19:40Z")

</div>

Version: 4.3.2  
Total Records: 102.6 Million

There are more than 30 tables totally, the largest table with 40 million data.

---

<div class="post-metadata">

### Author: ![proddata](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/proddata/32/1379_2.png) [@proddata](https://community.cratedb.com/u/proddata)
#### Post date: [April 22, 2021, 8:04pm UTC](https://community.cratedb.com/t/analyze-operation-causes-a-large-number-of-write-failures/645/4 "2021-04-22T20:04:50Z")

</div>

This seems strange. Are you actively triggering `ANALYZE`?  
by default it would run at least once every 24h anyway.

Do you see anything in the logs?  
Are you constantly **inserting** , **updating** , **deleting** data?  
Could you maybe describe your usage patterns a bit more?

With CrateDB 4.4.1 there was a fix concering `ANALYZE` but I am unsure if this is related.

---

<div class="post-metadata">

### Author: ![lijiangt](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/lijiangt/32/282_2.png) [@lijiangt](https://community.cratedb.com/u/lijiangt)
#### Post date: [April 27, 2021, 5:00am UTC](https://community.cratedb.com/t/analyze-operation-causes-a-large-number-of-write-failures/645/5 "2021-04-27T05:00:55Z")

</div>

I turned off the automatic operation of analyze, and manually run it every 2-3 days. The following exceptions occurred during operation:  
Write error：  
Caused by: java.util.concurrent.TimeoutException: null  
at com.ning.http.client.providers.netty.future.NettyResponseFuture.get(NettyResponseFuture.java:159)

Read error：  
“JobKilledException[Job killed. Received data for job=dbb5a6fa-df9c-413b-aa57-5822c7653e42 but there is no job context present. This can happen due to bad network latency or if individual nodes are unresponsive due to high load]”
