# Dgraph server error: Couldn't take snapshot

**URL:** <https://discuss.dgraph.io/t/dgraph-server-error-couldnt-take-snapshot/2305>\
**Category:** Users\
**Created:** [March 13, 2018, 3:37am UTC](https://discuss.dgraph.io/t/dgraph-server-error-couldnt-take-snapshot/2305 "2018-03-13T03:37:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzhu077](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jzhu077](https://discuss.dgraph.io/u/jzhu077)\
**Post date:** [March 13, 2018, 3:37am UTC](https://discuss.dgraph.io/t/dgraph-server-error-couldnt-take-snapshot/2305/1 "2018-03-13T03:37:33Z")

</div>

2018/03/13 03:33:59 draft.go:653: Couldn’t take snapshot, txn watermark: [3811], applied watermark: [28390]   
Will this error affect data ingestion?

---

<div class="post-metadata">

**Author:** ![pawan](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pawan/32/1946_2.png) [@pawan](https://discuss.dgraph.io/u/pawan)\
**Post date:** [March 13, 2018, 4:00am UTC](https://discuss.dgraph.io/t/dgraph-server-error-couldnt-take-snapshot/2305/2 "2018-03-13T04:00:19Z")

</div>

Yeah, if snapshot can’t be done for long it will make the server go out of memory very quickly. Are you using the Go client to load the data?

---

<div class="post-metadata">

**Author:** ![jzhu077](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jzhu077](https://discuss.dgraph.io/u/jzhu077)\
**Post date:** [March 13, 2018, 4:02am UTC](https://discuss.dgraph.io/t/dgraph-server-error-couldnt-take-snapshot/2305/3 "2018-03-13T04:02:03Z")

</div>

yes. and the dgraph image is dgraph/dgraph:v1.0.4

---

<div class="post-metadata">

**Author:** ![pawan](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pawan/32/1946_2.png) [@pawan](https://discuss.dgraph.io/u/pawan)\
**Post date:** [March 13, 2018, 4:09am UTC](https://discuss.dgraph.io/t/dgraph-server-error-couldnt-take-snapshot/2305/4 "2018-03-13T04:09:28Z")

</div>

Ok, we’d need to replicate this and see why snapshot isn’t happening. What is your general setup like and how do you load this data?

---

<div class="post-metadata">

**Author:** ![jzhu077](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jzhu077](https://discuss.dgraph.io/u/jzhu077)\
**Post date:** [March 13, 2018, 11:47pm UTC](https://discuss.dgraph.io/t/dgraph-server-error-couldnt-take-snapshot/2305/5 "2018-03-13T23:47:39Z")

</div>

the cluster consists of 5 dgraph zeros and 30 servers

```auto
dgraph zero --replicas 3 --my=$(hostname -f):5080 --peer dgraph-zero-0.dgraph-zero.default.svc.cluster.local:5080 --idx $idx --rebalance_interval 60m0s

```

```auto
dgraph server --my=$(hostname -f):7090 \
              --memory_mb 6000 \
              --zero dgraph-zero-0.dgraph-zero.default.svc.cluster.local:5080 \
              --idx $idx \
              --port_offset $offset \
              --debugmode \
              --query_edge_limit 18446744073709551615

```

we load the data via Go client with transaction batch size set to 100,000.

---

<div class="post-metadata">

**Author:** ![pawan](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pawan/32/1946_2.png) [@pawan](https://discuss.dgraph.io/u/pawan)\
**Post date:** [March 13, 2018, 11:57pm UTC](https://discuss.dgraph.io/t/dgraph-server-error-couldnt-take-snapshot/2305/6 "2018-03-13T23:57:10Z")

</div>

I fixed a small issue yesterday. So maybe try with `dgraph-io/dgraph:master` and see if it still happens. I will spin up a Kubernetes cluster soon and try to load data using `dgraph live` to see if I can replicate this issue.

---

<div class="post-metadata">

**Author:** ![zboralski](https://avatars.discourse-cdn.com/v4/letter/z/df705f/32.png) [@zboralski](https://discuss.dgraph.io/u/zboralski)\
**Post date:** [March 15, 2018, 3:00pm UTC](https://discuss.dgraph.io/t/dgraph-server-error-couldnt-take-snapshot/2305/7 "2018-03-15T15:00:53Z")

</div>

Had the same problem today with a single 32GB instance

---

<div class="post-metadata">

**Author:** ![zboralski](https://avatars.discourse-cdn.com/v4/letter/z/df705f/32.png) [@zboralski](https://discuss.dgraph.io/u/zboralski)\
**Post date:** [March 15, 2018, 3:01pm UTC](https://discuss.dgraph.io/t/dgraph-server-error-couldnt-take-snapshot/2305/8 "2018-03-15T15:01:26Z")

</div>

using 1.0.4

```auto
 server.go:409: Received query: schema {}
2018/03/15 14:59:34 groups.go:316: Asking if I can serve tablet for: _share_hash_
2018/03/15 14:59:37 draft.go:653: Couldn't take snapshot, txn watermark: [1239490], applied watermark: [1872343]
2018/03/15 14:59:41 server.go:409: Received query: {
  me(func: has(username)) @filter(has(pagerank)) {
    count(uid)
  }
}
2018/03/15 15:00:07 draft.go:653: Couldn't take snapshot, txn watermark: [1239490], applied watermark: [1872343]

```

---

<div class="post-metadata">

**Author:** ![zboralski](https://avatars.discourse-cdn.com/v4/letter/z/df705f/32.png) [@zboralski](https://discuss.dgraph.io/u/zboralski)\
**Post date:** [March 15, 2018, 3:02pm UTC](https://discuss.dgraph.io/t/dgraph-server-error-couldnt-take-snapshot/2305/9 "2018-03-15T15:02:34Z")

</div>

ok now it works…

```auto
Writing snapshot at index: 1872369, applied mark: 1872379
2018/03/15 15:00:37 wal.go:118: Writing snapshot to WAL, metadata: {ConfState:{Nodes:[1] XXX_unrecognized:[]} Index:1872369 Term:13 XXX_unrecognized:[]}, len(data): 27

```

---

<div class="post-metadata">

**Author:** ![pawan](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pawan/32/1946_2.png) [@pawan](https://discuss.dgraph.io/u/pawan)\
**Post date:** [March 15, 2018, 10:46pm UTC](https://discuss.dgraph.io/t/dgraph-server-error-couldnt-take-snapshot/2305/10 "2018-03-15T22:46:43Z")

</div>

The warning can be there temporarily. We will change the logs to mention it as a warning which is logged only in debug mode. It is only an issue if it remains for a long time.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/2/2b38fdece2abe5814f2e51bee69d1e67fc304b0a.png) [@system](https://discuss.dgraph.io/u/system)\
**Post date:** [April 14, 2018, 11:00pm UTC](https://discuss.dgraph.io/t/dgraph-server-error-couldnt-take-snapshot/2305/11 "2018-04-14T23:00:11Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
