# SocketException: OS Error, Connection reset by Peer Android 11

**URL:** <https://community.parseplatform.org/t/socketexception-os-error-connection-reset-by-peer-android-11/1929>\
**Category:** Flutter SDK\
**Created:** [August 26, 2021, 9:08am UTC](https://community.parseplatform.org/t/socketexception-os-error-connection-reset-by-peer-android-11/1929 "2021-08-26T09:08:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![loooookiezxc](https://community.parseplatform.org/user_avatar/community.parseplatform.org/loooookiezxc/32/520_2.png) [@loooookiezxc](https://community.parseplatform.org/u/loooookiezxc)\
**Post date:** [August 26, 2021, 9:08am UTC](https://community.parseplatform.org/t/socketexception-os-error-connection-reset-by-peer-android-11/1929/1 "2021-08-26T09:08:50Z")

</div>

I have an app that is running perfectly in an Android Emulator with an Android 10 OS version. But upon testing it on Android 11. I frequently see this error

I’m running Parse Health Check first every time I start the app. And this is the response

```auto
ParseException (Type: UnknownError) :
Code: -1
Message: ----

```

Followed by

```auto
SocketException: OS Error, Connection reset by peer ....

```

Can someone help me here? I’ve been scratching my head for two days now.

Flutter SDK  
Parse Server running on Digital Ocean  
Nginx Load Balancer

---

<div class="post-metadata">

**Author:** ![Manuel](https://community.parseplatform.org/user_avatar/community.parseplatform.org/manuel/32/186_2.png) [@Manuel](https://community.parseplatform.org/u/Manuel)\
**Post date:** [September 11, 2021, 9:29am UTC](https://community.parseplatform.org/t/socketexception-os-error-connection-reset-by-peer-android-11/1929/2 "2021-09-11T09:29:52Z")

</div>

Do you see any logs on the server side?

This could be an architectural issue in your infrastructure, specifically the timeout configurations of network components.

---

<div class="post-metadata">

**Author:** ![loooookiezxc](https://community.parseplatform.org/user_avatar/community.parseplatform.org/loooookiezxc/32/520_2.png) [@loooookiezxc](https://community.parseplatform.org/u/loooookiezxc)\
**Post date:** [September 11, 2021, 9:51am UTC](https://community.parseplatform.org/t/socketexception-os-error-connection-reset-by-peer-android-11/1929/3 "2021-09-11T09:51:10Z")

</div>

Hi @Manuel, I am seeing TCP connection resets. But nothing on the Nginx Server. I think this is where I should dig more. I’m currently looking and reading documentation and articles. If you can, do you know what is the cause of this? This doesn’t happen very often. I think it’s 3 out 10.

---

<div class="post-metadata">

**Author:** ![loooookiezxc](https://community.parseplatform.org/user_avatar/community.parseplatform.org/loooookiezxc/32/520_2.png) [@loooookiezxc](https://community.parseplatform.org/u/loooookiezxc)\
**Post date:** [September 11, 2021, 9:51am UTC](https://community.parseplatform.org/t/socketexception-os-error-connection-reset-by-peer-android-11/1929/4 "2021-09-11T09:51:58Z")

</div>

Yes that’s what I am thinking I have timeouts on the load balancer and on the upstream servers. But how long should I keep them alive?

---

<div class="post-metadata">

**Author:** ![loooookiezxc](https://community.parseplatform.org/user_avatar/community.parseplatform.org/loooookiezxc/32/520_2.png) [@loooookiezxc](https://community.parseplatform.org/u/loooookiezxc)\
**Post date:** [September 11, 2021, 9:54am UTC](https://community.parseplatform.org/t/socketexception-os-error-connection-reset-by-peer-android-11/1929/5 "2021-09-11T09:54:44Z")

</div>

I’m using Netdata to monitor the server and this is a screenshot

![image](https://parse-community-forum-uploads.s3.dualstack.us-east-1.amazonaws.com/original/1X/16e659815886cf4274445afcf457c14f9de16197.png)

---

<div class="post-metadata">

**Author:** ![Manuel](https://community.parseplatform.org/user_avatar/community.parseplatform.org/manuel/32/186_2.png) [@Manuel](https://community.parseplatform.org/u/Manuel)\
**Post date:** [September 11, 2021, 9:55am UTC](https://community.parseplatform.org/t/socketexception-os-error-connection-reset-by-peer-android-11/1929/6 "2021-09-11T09:55:05Z")

</div>

So far it sounds like a timeout config issue to me, but you are right in that it needs more investigation. It’s a typical characteristic of timeout mismatches that issues occur only sporadically, making it hard to pin it down at first.

---

<div class="post-metadata">

**Author:** ![loooookiezxc](https://community.parseplatform.org/user_avatar/community.parseplatform.org/loooookiezxc/32/520_2.png) [@loooookiezxc](https://community.parseplatform.org/u/loooookiezxc)\
**Post date:** [September 11, 2021, 10:01am UTC](https://community.parseplatform.org/t/socketexception-os-error-connection-reset-by-peer-android-11/1929/7 "2021-09-11T10:01:23Z")

</div>

Yeah. Actually in my load balancer I have 2 instances of parse and 2 instances of live query all in different servers. I’m gonna check all of their Nginx configs and get back here if I see something. Thanks @Manuel !

---

<div class="post-metadata">

**Author:** ![Manuel](https://community.parseplatform.org/user_avatar/community.parseplatform.org/manuel/32/186_2.png) [@Manuel](https://community.parseplatform.org/u/Manuel)\
**Post date:** [September 11, 2021, 10:01am UTC](https://community.parseplatform.org/t/socketexception-os-error-connection-reset-by-peer-android-11/1929/8 "2021-09-11T10:01:58Z")

</div>

I wrote a [post](https://github.com/parse-community/parse-server/issues/6778#issuecomment-655160911) a while ago that explains how timeouts should be adjusted to each other. Specifically for Heroku, but the concept applies also to your infrastructure.

---

<div class="post-metadata">

**Author:** ![loooookiezxc](https://community.parseplatform.org/user_avatar/community.parseplatform.org/loooookiezxc/32/520_2.png) [@loooookiezxc](https://community.parseplatform.org/u/loooookiezxc)\
**Post date:** [September 11, 2021, 10:02am UTC](https://community.parseplatform.org/t/socketexception-os-error-connection-reset-by-peer-android-11/1929/9 "2021-09-11T10:02:38Z")

</div>

Thanks I’ll go and read that now.

---

<div class="post-metadata">

**Author:** ![loooookiezxc](https://community.parseplatform.org/user_avatar/community.parseplatform.org/loooookiezxc/32/520_2.png) [@loooookiezxc](https://community.parseplatform.org/u/loooookiezxc)\
**Post date:** [September 11, 2021, 5:32pm UTC](https://community.parseplatform.org/t/socketexception-os-error-connection-reset-by-peer-android-11/1929/10 "2021-09-11T17:32:06Z")

</div>

Hey @Manuel thanks for taking me on the right path. I did misconfigure the timeout and keepalive request values on my infrastructure. The load balancer and upstream server don’t have the same values. The same with the HTTP server timeout that you have mentioned in the post you’ve attached. I configured my load balancer and upstream servers to have the same values. Also, all of my parse server instances now have the same values but are different from the Nginx Configuration. I’ll keep monitoring the server logs and see if the issue persists. Thanks again

---

<div class="post-metadata">

**Author:** ![Manuel](https://community.parseplatform.org/user_avatar/community.parseplatform.org/manuel/32/186_2.png) [@Manuel](https://community.parseplatform.org/u/Manuel)\
**Post date:** [September 11, 2021, 8:18pm UTC](https://community.parseplatform.org/t/socketexception-os-error-connection-reset-by-peer-android-11/1929/11 "2021-09-11T20:18:54Z")

</div>

Amazing! Thanks for the update, glad it helped.
