Stops serving unable to connect database

Discussion in 'ISPConfig 3 Priority Support' started by unsichtbare, Dec 4, 2023.

  1. unsichtbare

    unsichtbare Member HowtoForge Supporter

    Howdy again!
    I built a fresh 22.04 ubuntu and installed ISPConfig with the script, then migrated sites using the Migration Toolkit. After a migration error and rebuild, everything went well. Now twice the server has stopped serving sites (with a DB), no errors in Apache logs but this one recurring in MySQL/Maria logs:
    Code:
     133367 Query    SET @@SESSION.sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
    Could that cause MariaDB to crash?
    Thanks,
    -John
     
  2. unsichtbare

    unsichtbare Member HowtoForge Supporter

    Last lines of log while not serving (mywebsite is just a placeholder):
    Code:
    231204 15:54:00  44304 Query    SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve, NULLIF(imap_prefix, '') as "userdb_namespace/inbox/prefix" FROM mail_user WHERE (login = '[email protected]' OR email = '[email protected]') AND `disablesmtp` = 'n' AND server_id = '1' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = 'mywebsite.com' AND active = 'n' AND server_id = 1)
    Here is the error that we see:
    Error establishing a database connection
     
  3. unsichtbare

    unsichtbare Member HowtoForge Supporter

    Found this in kern.log:
    Code:
    [76504.010031] auth[262263]: segfault at b8 ip 0000abcdabcd sp 00007ffe1abcdabcs error 4 in libmysqlclient.so.21.2.35[7f4cb0abcdabc+8c000]libmysqlclient.so.21.2.35[7f4cbabcdabc+8c000]
     
  4. unsichtbare

    unsichtbare Member HowtoForge Supporter

    OK, more info, I am running out of memory. Cloud server has 8GB RAM, shouldn't that be enough?
    Code:
     oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=init.scope,mems_allowed=0,global_oom,task_memcg=/system.slice/mariadb.service,task=mariadbd,pid=960,uid=115
    Dec  4 15:54:13  Out of memory: Killed process 960 (mariadbd) total-vm:4109988kB, anon-rss:2447060kB, file-rss:0kB, shmem-rss:0kB, UID:115 pgtables:5144kB oom_score_adj:
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    There is also a tool called mysqltuner which can help you to fine-tune mysql/mariadb settings so they do not exceed max memory size.
     
    Th0m likes this.
  7. unsichtbare

    unsichtbare Member HowtoForge Supporter

    Thanks, I will do both.
     

Share This Page