{"id":4904,"date":"2021-09-26T05:05:55","date_gmt":"2021-09-26T05:05:55","guid":{"rendered":"https:\/\/tst-amo.net.ua\/blog\/?p=4904"},"modified":"2021-09-28T08:40:03","modified_gmt":"2021-09-28T08:40:03","slug":"mysql-45-note-aborted-connection-45-to-db-postfix-user-postfix-host-localhost-got-an-error-reading-communication-packets","status":"publish","type":"post","link":"https:\/\/tst-amo.net.ua\/blog\/?p=4904","title":{"rendered":"MySQL 45 [Note] Aborted connection 45 to db: &#8216;postfix&#8217; user: &#8216;postfix&#8217; host: &#8216;localhost&#8217; (Got an error reading communication packets)"},"content":{"rendered":"<p>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 5.6 \u043d\u0430 5.7.<\/p>\n<p>\u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c\u0438:<\/p>\n<p>If a client successfully connects but later disconnects improperly or is terminated, the server increments the\u00a0<a class=\"link\" href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/server-status-variables.html#statvar_Aborted_clients\"><code class=\"literal\">Aborted_clients<\/code><\/a>\u00a0status variable, and logs an\u00a0<span class=\"errortext\">Aborted connection<\/span>\u00a0message to the error log. The cause can be any of the following:<\/p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">The client program did not call\u00a0<a class=\"ulink\" href=\"https:\/\/dev.mysql.com\/doc\/c-api\/5.7\/en\/mysql-close.html\" target=\"_top\" rel=\"noopener\"><code class=\"literal\">mysql_close()<\/code><\/a>\u00a0before exiting.<\/li>\n<li class=\"listitem\">The client had been sleeping more than\u00a0<a class=\"link\" href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/server-system-variables.html#sysvar_wait_timeout\"><code class=\"literal\">wait_timeout<\/code><\/a>\u00a0or\u00a0<a class=\"link\" href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/server-system-variables.html#sysvar_interactive_timeout\"><code class=\"literal\">interactive_timeout<\/code><\/a>\u00a0seconds without issuing any requests to the server. See\u00a0<a class=\"xref\" title=\"5.1.7\u00a0Server System Variables\" href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/server-system-variables.html\">Section\u00a05.1.7, \u201cServer System Variables\u201d<\/a>.<\/li>\n<li class=\"listitem\">The client program ended abruptly in the middle of a data transfer.<\/li>\n<\/ul>\n<\/div>\n<p>Other reasons for problems with aborted connections or aborted clients:<\/p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">The\u00a0<a class=\"link\" href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/server-system-variables.html#sysvar_max_allowed_packet\"><code class=\"literal\">max_allowed_packet<\/code><\/a>\u00a0variable value is too small or queries require more memory than you have allocated for\u00a0<a class=\"link\" title=\"4.3.1\u00a0mysqld \u2014 The MySQL Server\" href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/mysqld.html\"><span class=\"command\"><strong>mysqld<\/strong><\/span><\/a>. See\u00a0<a class=\"xref\" title=\"B.3.2.8\u00a0Packet Too Large\" href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/packet-too-large.html\">Section\u00a0B.3.2.8, \u201cPacket Too Large\u201d<\/a>.<\/li>\n<li class=\"listitem\">Use of Ethernet protocol with Linux, both half and full duplex. Some Linux Ethernet drivers have this bug. You should test for this bug by transferring a huge file using FTP between the client and server machines. If a transfer goes in burst-pause-burst-pause mode, you are experiencing a Linux duplex syndrome. Switch the duplex mode for both your network card and hub\/switch to either full duplex or to half duplex and test the results to determine the best setting.<\/li>\n<li class=\"listitem\">A problem with the thread library that causes interrupts on reads.<\/li>\n<li class=\"listitem\">Badly configured TCP\/IP.<\/li>\n<li class=\"listitem\">Faulty Ethernets, hubs, switches, cables, and so forth. This can be diagnosed properly only by replacing hardware.<\/li>\n<\/ul>\n<\/div>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0441\u0435\u0442\u044c \u0438 \u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c Dovecot, Postfix \u0438 MySQL \u0442\u043e \u0432\u0438\u043d\u043e\u0432\u043d\u0438\u043a\u043e\u043c \u0431\u044b\u043b\u0430 \u043a\u0430\u043a\u0430\u044f \u0442\u043e \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435, \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0442\u0430\u043a\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435:<\/p>\n<pre># ee \/usr\/local\/etc\/mysql\/my.cnf\r\n\r\n[mysqld]\r\n....\r\nmax_allowed_packet = <span style=\"color: #ff0000;\">256<\/span>M # \u0431\u044b\u043b\u043e 16\u041c\r\nmax_connections = 400\r\nwait_timeout = 28800\r\nconnect_timeout = 10\r\ninteractive_timeout = 28800\r\n....<\/pre>\n<p>\u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441:<\/p>\n<pre># service mysql-server restart\r\n# service mysql-server status<\/pre>\n<p>\u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043d\u0435 \u0443\u0431\u0440\u0430\u043b\u043e, \u043d\u043e \u0441\u0442\u0430\u043b\u043e \u0432\u043c\u0435\u0441\u0442\u043e 1 \u0440\u0430\u0437\u0430 \u0432 2-3 \u043c\u0438\u043d\u0443\u0442\u044b, \u0434\u043e 1 \u0440\u0430\u0437\u0430 \u0432 25-35 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<p><a href=\"https:\/\/dovecot.org\/pipermail\/dovecot\/2019-October\/117403.html\">https:\/\/dovecot.org\/pipermail\/dovecot\/2019-October\/117403.html<\/a><\/p>\n<p><a href=\"https:\/\/deniapps.com\/blog\/mysql-rds-aborted-connection-error-aws-lambda\">https:\/\/deniapps.com\/blog\/mysql-rds-aborted-connection-error-aws-lambda<\/a><\/p>\n<div class=\"pdfprnt-buttons pdfprnt-buttons-post pdfprnt-bottom-right\"><a href=\"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=wpv2posts4904&print=pdf\" class=\"pdfprnt-button pdfprnt-button-pdf\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/tst-amo.net.ua\/blog\/wp-content\/plugins\/pdf-print\/images\/pdf.png\" alt=\"image_pdf\" title=\"View PDF\" \/><\/a><a href=\"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=wpv2posts4904&print=print\" class=\"pdfprnt-button pdfprnt-button-print\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/tst-amo.net.ua\/blog\/wp-content\/plugins\/pdf-print\/images\/print.png\" alt=\"image_print\" title=\"Print Content\" \/><\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 5.6 \u043d\u0430 5.7. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c\u0438: If a client successfully connects but later disconnects improperly or is terminated, the server increments the\u00a0Aborted_clients\u00a0status variable, and logs an\u00a0Aborted connection\u00a0message to the error log. The cause can be any of the following: The client program did not call\u00a0mysql_close()\u00a0before &#8230;<\/p>\n<p><a href=\"https:\/\/tst-amo.net.ua\/blog\/?p=4904\" class=\"more-link\">Continue reading &lsquo;MySQL 45 [Note] Aborted connection 45 to db: &#8216;postfix&#8217; user: &#8216;postfix&#8217; host: &#8216;localhost&#8217; (Got an error reading communication packets)&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50,15],"tags":[],"class_list":["post-4904","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-mysql"],"_links":{"self":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4904"}],"collection":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4904"}],"version-history":[{"count":6,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4904\/revisions"}],"predecessor-version":[{"id":4911,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4904\/revisions\/4911"}],"wp:attachment":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}