# Troubleshooting/debugging connection resets

**URL:** <https://forums.percona.com/t/troubleshooting-debugging-connection-resets/7744>\
**Category:** Percona Server for MySQL 5.6\
**Tags:** troubleshooting, mysql\
**Created:** [July 7, 2020, 3:45am UTC](https://forums.percona.com/t/troubleshooting-debugging-connection-resets/7744 "2020-07-07T03:45:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![j4nd3r53n](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@j4nd3r53n](https://forums.percona.com/u/j4nd3r53n)\
**Post date:** [July 7, 2020, 3:45am UTC](https://forums.percona.com/t/troubleshooting-debugging-connection-resets/7744/1 "2020-07-07T03:45:46Z")

</div>

I have an intermittent error on our databases (Percona MySQL 5.6 on  
Debian 8) which I haven’t been able to find information about online - my colleague runs a python script and it occasionally gets kicked out with:

```auto
ConnectionResetError: [Errno 104] Connection reset by peer

```

As I understand it, this is because mysqld for some reason decides to reset the connection. Is there any way that I can get to see what causes mysqld to do this? The logs don’t show anything.

---

<div class="post-metadata">

**Author:** ![yves.trudeau](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yves.trudeau/32/2825_2.png) [@yves.trudeau](https://forums.percona.com/u/yves.trudeau)\
**Post date:** [July 24, 2020, 7:48am UTC](https://forums.percona.com/t/troubleshooting-debugging-connection-resets/7744/2 "2020-07-24T07:48:01Z")

</div>

Hi,&nbsp;&nbsp;&nbsp; any MySQL connections will timeout after being inactive for more than “wait\_timeout”.&nbsp; The default is 8h (28800s).&nbsp; If that is not the case, is there a NAT router in between?&nbsp; If the script runs in docker, be aware the host performs NAT for the containers and if I am remember well, the default linux timeout for TCP connections is 15min.&nbsp;
