# Go client EOF error

**URL:** <https://discuss.aerospike.com/t/go-client-eof-error/10138>\
**Category:** Go Client\
**Tags:** go, error\
**Created:** [April 13, 2023, 5:18am UTC](https://discuss.aerospike.com/t/go-client-eof-error/10138 "2023-04-13T05:18:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramakant\_Soni](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/ramakant_soni/32/1938_2.png) [@Ramakant\_Soni](https://discuss.aerospike.com/u/Ramakant_Soni)\
**Post date:** [April 13, 2023, 5:18am UTC](https://discuss.aerospike.com/t/go-client-eof-error/10138/1 "2023-04-13T05:18:33Z")

</div>

Hi everyone,

I am randomly facing an issue whenever I am setting data corresponding to a aerospike key or while deleting any key. Error I am getting is EOF that’s all. And I am getting this error randomly and quite frequently, 10% of requests are failed because of this single error.

I am using all default settings provided by go library, just added a extra condition in write policy (writePolicy.MaxRetries = 2).

We are facing this on prod. Please help here

---

<div class="post-metadata">

**Author:** ![Khosrow\_Afroozeh](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@Khosrow\_Afroozeh](https://discuss.aerospike.com/u/Khosrow_Afroozeh)\
**Post date:** [April 13, 2023, 5:51am UTC](https://discuss.aerospike.com/t/go-client-eof-error/10138/2 "2023-04-13T05:51:01Z")

</div>

This means that your connection to the database nodes are not stable (Network issue). Increase the Timeout and SocketTimeout accordingly, and monitor the quality of your network. The default for the policies cannot assume the optimal values for all conditions and environments, so you should study them and set proper values for your own use case and environment.

---

<div class="post-metadata">

**Author:** ![Ramakant\_Soni](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/ramakant_soni/32/1938_2.png) [@Ramakant\_Soni](https://discuss.aerospike.com/u/Ramakant_Soni)\
**Post date:** [April 19, 2023, 12:20pm UTC](https://discuss.aerospike.com/t/go-client-eof-error/10138/3 "2023-04-19T12:20:27Z")

</div>

Thanks for reply -

Hi @Khosrow_Afroozeh, Thanks for your reply

In my case : SocketTimeout is 30 sec TotalTimeout is 0

I increased MaxRetries to 3, still error frequency is same.

---

<div class="post-metadata">

**Author:** ![Khosrow\_Afroozeh](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@Khosrow\_Afroozeh](https://discuss.aerospike.com/u/Khosrow_Afroozeh)\
**Post date:** [April 19, 2023, 3:09pm UTC](https://discuss.aerospike.com/t/go-client-eof-error/10138/4 "2023-04-19T15:09:30Z")

</div>

I think we limit the total timeout to 30s anyway, so the retries in your policy will have no effect. Your timeout values are way too large. For simple operations (get, put, delete) try:

```go
policy.SocketTimeout = 250 * time.Millisecond
policy.TotalTimeout = 1000 * time.Millisecond
policy.MaxRetries = 3

```
