Skip to main content

warrning - Aborted connection 2930 to db

Comments

6 comments

  • cPRex Jurassic Moderator
    Hey there! We likely aren't going to be able to help much with this specific piece of data, but there are still ways you can find out more about the issue. I would use the details in this article to enable the general query log *briefly* so you can see every query that is happening on the server:
    0
  • LadyLeya
    Hello, thank you so much for your reply. I've enabled it today (but on a test server since the issue happening on every server). Here it is (it matches with the warnings I'm getting in the MySQL log: MySQL log: 2023-11-27 20:21:02 3900 [Warning] Aborted connection 3900 to db: 'mysql' user: 'root' host: 'localhost' (Got an error reading communication packets) 2023-11-27 20:21:32 3903 [Warning] Aborted connection 3903 to db: 'mysql' user: 'root' host: 'localhost' (Got an error reading communication packets) query.log: 231127 20:20:32 3898 Connect root@localhost on mysql using Socket 3898 Query SET NAMES utf8 3898 Query SET AUTOCOMMIT = 0 3899 Connect root@localhost on mysql using Socket 3899 Query SET NAMES utf8 3899 Query SET AUTOCOMMIT = 0 3899 Query show global status where Variable_name = 'Questions' 3899 Quit 231127 20:21:02 3900 Connect root@localhost on mysql using Socket 3900 Query SET NAMES utf8 3900 Query SET AUTOCOMMIT = 0 3901 Connect root@localhost on mysql using Socket 3901 Query SET NAMES utf8 3901 Query SET AUTOCOMMIT = 0 3901 Query show global status where Variable_name = 'Questions' 3901 Quit 3902 Connect root@localhost on using Socket 3902 Query show processlist 3902 Quit Thank you for any kind of information. Much appreciated :)
    0
  • cPRex Jurassic Moderator
    I was hoping it would show the query more directly, but that does confirm that a query is indeed happening. Since you said it's generating every 30 seconds, do you have any crons that have a database connection in them?
    0
  • LadyLeya
    Hello, Here are all the crons on the server: 21 22 * * * (/usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp --cron > /dev/null) 0 2 * * * /usr/local/cpanel/bin/backup 35 * * * * /usr/bin/test -x /usr/local/cpanel/bin/tail-check && /usr/local/cpanel/bin/tail-check 0 6 * * * /usr/local/cpanel/scripts/exim_tidydb > /dev/null 2>&1 30 5 * * * /usr/local/cpanel/scripts/optimize_eximstats > /dev/null 2>&1 7,22,37,52 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1 @reboot /usr/local/cpanel/bin/onboot_handler 5,20,35,50 * * * * /usr/local/cpanel/scripts/eximstats_spam_check 2>&1 30 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache 25 */2 * * * /usr/local/cpanel/bin/mysqluserstore >/dev/null 2>&1 15 */2 * * * /usr/local/cpanel/bin/dbindex >/dev/null 2>&1 15 */6 * * * /usr/local/cpanel/scripts/autorepair recoverymgmt >/dev/null 2>&1 */5 * * * * /usr/local/cpanel/scripts/dcpumon-wrapper >/dev/null 2>&1 @reboot /usr/sbin/cloudlinux-collect-panic-info 0 */2 * * * /usr/local/cpanel/scripts/shrink_modsec_ip_database -x 2>&1 35 3 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify 09,39 * * * * /usr/local/cpanel/scripts/clean_user_php_sessions > /dev/null 2>&1 4 * * * * /usr/local/cpanel/bin/process_team_queue > /dev/null 2>&1 Nothing that would indicate that there is a cron for the connection to the database.
    0
  • cPRex Jurassic Moderator
    I agree. I'd look more into the database queries to see if you can find the specific culprit.
    0
  • cPanelPeter cPanel Staff

    Hello, 

    "Aborted connection to DB: (Got an error writing communication packets)"
    Usually, this indicates a network connectivity issue, and you should check the condition of your network if this error occurs frequently.

    One of the silent killers of MySQL Connections is the MySQL Packet. MySQL network communication code was written under the assumption that queries are always reasonably short, and therefore can be sent to and processed by the server in one chunk, which is called a packet in MySQL terminology.

    # mysql -BNe "SHOW VARIABLES LIKE 'max_allowed_packet'"
    max_allowed_packet 268435456

    (that's 256M in bytes, which is the default).

    The server allocates the memory for a temporary buffer to store the packet, and it requests enough to fit it entirely. This architecture requires a precaution to avoid having the server run out of memory---a cap on the size of the packet, which this option accomplishes.

     

     

    0

Please sign in to leave a comment.