# Percona Ctradb 8.0 fake timout

**URL:** <https://forums.percona.com/t/percona-ctradb-8-0-fake-timout/30134>\
**Category:** Percona XtraDB Cluster\
**Created:** [May 8, 2024, 10:43am UTC](https://forums.percona.com/t/percona-ctradb-8-0-fake-timout/30134 "2024-05-08T10:43:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![crimson\_pirate](https://avatars.discourse-cdn.com/v4/letter/c/a698b9/32.png) [@crimson\_pirate](https://forums.percona.com/u/crimson_pirate)\
**Post date:** [May 8, 2024, 10:43am UTC](https://forums.percona.com/t/percona-ctradb-8-0-fake-timout/30134/1 "2024-05-08T10:43:38Z")

</div>

Hi

I have a Percona xtradb 8.0 cluster where I’ve been testing db timeouts.

in my.cnf I have the following timeout settings where I set timeout to 900s:

```auto
[mysqld]
...
interactive_timeout=900
wait_timeout=900

```

more timeout settings

```auto
mysql> show variables like '%timeout%';
+-------------------------------------+----------+
| Variable_name | Value |
+-------------------------------------+----------+
| connect_timeout | 10 |
| delayed_insert_timeout | 300 |
| have_statement_timeout | YES |
| innodb_flush_log_at_timeout | 1 |
| innodb_lock_wait_timeout | 50 |
| innodb_print_lock_wait_timeout_info | OFF |
| innodb_rollback_on_timeout | OFF |
| interactive_timeout | 900 |
| lock_wait_timeout | 31536000 |
| mysqlx_connect_timeout | 30 |
| mysqlx_idle_worker_thread_timeout | 60 |
| mysqlx_interactive_timeout | 28800 |
| mysqlx_port_open_timeout | 0 |
| mysqlx_read_timeout | 30 |
| mysqlx_wait_timeout | 28800 |
| mysqlx_write_timeout | 60 |
| net_read_timeout | 30 |
| net_write_timeout | 60 |
| replica_net_timeout | 60 |
| rpl_stop_replica_timeout | 31536000 |
| rpl_stop_slave_timeout | 31536000 |
| slave_net_timeout | 60 |
| ssl_session_cache_timeout | 300 |
| thread_pool_idle_timeout | 60 |
| wait_timeout | 900 |
| wsrep_RSU_commit_timeout | 5000 |
+-------------------------------------+----------+
26 rows in set (0.00 sec)

```

However I created a connection and let it rest for 15 + minutes I get the following error which seems to indicate that the connection was disabled , but the queries still gives results.

```auto
mysql> select 1 from dual;
ERROR 4031 (HY000): The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior.
No connection. Trying to reconnect...
Connection id: 13175
Current database: ***NONE***

+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.04 sec)

```

How can I resolve this and actually make idle db connections timeout after 15 minutes?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [May 8, 2024, 1:57pm UTC](https://forums.percona.com/t/percona-ctradb-8-0-fake-timout/30134/2 "2024-05-08T13:57:19Z")

</div>

> [@crimson\_pirate](#):
>
> `ERROR 4031 (HY000): The client was disconnected`

@crimson_pirate Yes, the connection was indeed terminated. However, the mysql client has auto-reconnection abilities. That’s what happened. The client was disconnected, and then it re-connected:

> No connection. Trying to reconnect…

See? It tells you this. After it reconnected, the query was executed.

In your application code, you would have to implement auto reconnection on failure yourself. This auto reconnect is a feature of the CLI client.
