Error in accept: Socket operation on non-socket

gdakramgdakram EntrantActive Member Participant
We just recently upgraded our MySQL installation on a debian box.

mysqld version:
mysqld Ver 5.7.12-5 for debian-linux-gnu on x86_64 (Percona Server (GPL), Release '5', Revision 'a2f663a')

The MySQL server keeps hanging after every 30 minutes or so. The mysqld process doesn't die though. Not seeing any information of use in the syslog other than this in massive amounts:
`Jun 7 10:25:09 host mysqld[1235]: Error in accept: Socket operation on non-socket`

Would appreciate some insights on what to try as to finding the cause of this hanging. Thanks.

Here are some fine tuning settings in my.cnf:
max_allowed_packet = 64M
thread_stack = 256K
thread_cache_size = 8
max_connections = 10000
max_connect_errors = 10000
connect_timeout = 30
wait_timeout = 86400


  • anssiteanssite Entrant Member Participant
    We also have expirienced the same issue on Debian and after updating to 5.7.12-5. The server runs fine until we start our backup process to dump all the databases. The dump runs fine until usually after 40-50% of the databases are dumped, then percona server just hangs. It does not crash. It just stops responding to any connections trough socket or tcp. Only thing printed to the logs is:

    [ERROR] Error in accept: Socket operation on non-socket

    The same thing just keeps printed in the error.log hundreds of times in a minute until percona-server is restarted or stopped.

    This issue did not exists before updating 5.7.12-5, so did something change or is this a bug?
  • edwhedwh Contributor Active Member Participant
    I can reproduce this by telneting to port 3306 and then disconnecting, also after updating to 5.7.
  • jy.cadicjy.cadic Entrant Member Participant
    same probleme here.
    ii percona-server-server-5.7 5.7.15-9-1.jessie amd64 Percona Server database server binaries

    strace stuck on : "connect(3, {sa_family=AF_LOCAL, sun_path="mysqld.sock"}, 110) = 0
    setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = -1 EOPNOTSUPP (Operation not supported)
    setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0

    same error message : 2016-11-09T09:05:15.458847Z 0 [ERROR] Error in accept: Socket operation on non-socket

    get rid of it by doing a " Killall -HUP mysqld"

    connection possible again.

    if anyone could solve this, it would be great :-D
  • m0nkm0nk Entrant Member Participant
    I have also had this issue (just this morning, too)\. We've migrated our systems (20 servers in total) from ones with 5.5 installed to ones using 5.7 fresh install (dump and restore). It appears to be random, but we get logs that grow to nearly 35GB with this same error repeated for the entire log:

    2016-11-14T14:08:05.302909Z 0 [ERROR] Error in accept: Socket operation on non-socket

    The only way I have found to fix this is to clear the log and restart the mysql service. It's happened to 3 different systems without warning or anything I could find in common with what was happening at the time. I completed this migration a few weeks ago, so 3 times in 2-3 weeks is way too often for our business and clients. Any help would be greatly appreciated. We run Percona 5.7 on Ubuntu 12.04 with PHP 5.3 (another migration coming in the next few months to move to 16.04 and PHP 7).

    mysql Ver 14.14 Distrib 5.7.14-8, for debian-linux-gnu (x86_64) using 6.2
  • OlvikolviOlvikolvi Entrant Member Participant
    Did anyone solve this problem?

    I just upgraded from 5.5 to 5.7 and this happened to me too. Everyting works fine and whitout warning mysql just hangs and starts to fill log. Only way to fix this is kill mysqld and restart it.

    mysql Ver 14.14 Distrib 5.7.17-13, for debian-linux-gnu (x86_64) using 6.2
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.