Skip to content

Broken pipe errors #446

@marksamman

Description

@marksamman

Issue description

Connections that have been idle for some time are causing broken pipe errors the next time they are used. I haven't noticed queries actually failing, so I think this is just an annoyance of broken pipe errors appearing in the log. With a read/write timeout below wait_timeout, I would expect the idle connections to be closed by the driver before MySQL kills the connections.

DSN:

user:password@unix(/var/run/mysqld/mysqld.sock)/database?charset=utf8mb4,utf8&readTimeout=25000s&writeTimeout=25000s

Timeout variables:

MariaDB [(none)]> show variables like '%timeout%';
+-----------------------------+----------+
| Variable_name               | Value    |
+-----------------------------+----------+
| connect_timeout             | 5        |
| deadlock_timeout_long       | 50000000 |
| deadlock_timeout_short      | 10000    |
| delayed_insert_timeout      | 300      |
| innodb_flush_log_at_timeout | 1        |
| innodb_lock_wait_timeout    | 50       |
| innodb_rollback_on_timeout  | OFF      |
| interactive_timeout         | 28800    |
| lock_wait_timeout           | 31536000 |
| net_read_timeout            | 30       |
| net_write_timeout           | 60       |
| slave_net_timeout           | 3600     |
| thread_pool_idle_timeout    | 60       |
| wait_timeout                | 28800    |
+-----------------------------+----------+

Error log

packets.go:124: write unix @->/var/run/mysqld/mysqld.sock: write: broken pipe

Configuration

Driver version (or git SHA): 66312f7

Go version: 1.6 linux/amd64

Server version: MariaDB 10.1.13

Server OS: Debian 8.1 (Jessie)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions