Learn about Centmin Mod LEMP Stack today
Become a Member

MariaDB MariaDB 10.1 is stable GA

Discussion in 'MariaDB & General MySQL news & discussions' started by eva2000, Oct 17, 2015.

  1. eva2000

    eva2000 Administrator Staff Member

    55,917
    12,281
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,868
    Local Time:
    8:09 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Looks like from Systemd - MariaDB Knowledge Base MariaDB 10.1.8 onwards on CentOS 7.x only, it uses systemd more extensively so mysqld_safe isn't used so /etc/my.cnf [mysqld_safe] section options are ignored.
    i.e.
    Code:
    [mysqld_safe]
    socket=/var/lib/mysql/mysql.sock
    log-error=/var/log/mysqld.log
    #nice = -5
    open-files-limit = 8192
    Which means max open file descriptor limits are no longer controlled below system wide limits via /etc/my.cnf. This is especially the case for MariaDB 5.5/10.0 uprgades to MariaDB 10.1 as 10.1 upgrade process creates a new custom config file at /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf which migrates open files limit from pre 10.1 my.cnf mysqld_safe section to this custom config file.
    Code:
    cat /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
    # converted using /usr/bin/mariadb-service-convert
    #
    
    [Service]
    
    LimitNOFILE=8192
    which means if you try to raise open files limit in /etc/my.cnf above 8192 value via open-files-limit = 8192, it will not register and result in fixed 8192 value as set in /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf.


    So I need to update Centmin Mod's MariaDB 10.1 upgrade routine in Centmin Mod 123.09beta01 to detect CentOS 7 and to remove this file /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf and setup my own at /etc/systemd/system/mariadb.service.d/mdb101.conf with the following starter settings
    Code:
    [Service]
    OOMScoreAdjust=-600
    LimitNOFILE=262144
    LimitNPROC=16384
    Nice=-5
    before /etc/systemd/system/mariadb.service.d/mdb101.conf with /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf in place
    Code:
    cat /proc/`pidof mysqld`/limits
    Limit                     Soft Limit           Hard Limit           Units
    Max cpu time              unlimited            unlimited            seconds
    Max file size             unlimited            unlimited            bytes
    Max data size             unlimited            unlimited            bytes
    Max stack size            8388608              unlimited            bytes
    Max core file size        0                    unlimited            bytes
    Max resident set          unlimited            unlimited            bytes
    Max processes             7289                 7289                 processes
    Max open files            8192                 8192                 files
    Max locked memory         65536                65536                bytes
    Max address space         unlimited            unlimited            bytes
    Max file locks            unlimited            unlimited            locks
    Max pending signals       7289                 7289                 signals
    Max msgqueue size         819200               819200               bytes
    Max nice priority         0                    0          
    Max realtime priority     0                    0          
    Max realtime timeout      unlimited            unlimited            us  
    after /etc/systemd/system/mariadb.service.d/mdb101.conf with removal of /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
    Code:
    cat /proc/`pidof mysqld`/limits
    Limit                     Soft Limit           Hard Limit           Units
    Max cpu time              unlimited            unlimited            seconds
    Max file size             unlimited            unlimited            bytes
    Max data size             unlimited            unlimited            bytes
    Max stack size            8388608              unlimited            bytes
    Max core file size        0                    unlimited            bytes
    Max resident set          unlimited            unlimited            bytes
    Max processes             16384                16384                processes
    Max open files            262144               262144               files
    Max locked memory         65536                65536                bytes
    Max address space         unlimited            unlimited            bytes
    Max file locks            unlimited            unlimited            locks
    Max pending signals       7289                 7289                 signals
    Max msgqueue size         819200               819200               bytes
    Max nice priority         0                    0          
    Max realtime priority     0                    0          
    Max realtime timeout      unlimited            unlimited            us 
    Code:
    top - 15:51:56 up  1:15,  2 users,  load average: 0.00, 0.01, 0.05
    Tasks: 128 total,   1 running, 127 sleeping,   0 stopped,   0 zombie
    %Cpu(s):  0.1 us,  0.1 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
    KiB Mem :  1884472 total,   312756 free,   354864 used,  1216852 buff/cache
    KiB Swap:  1572860 total,  1572336 free,      524 used.  1195516 avail Mem
    
      PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                                                                                                           
    2138 nginx     10 -10  180424  29432   2844 S   0.3  1.6   0:06.28 nginx: worker process                                                                                                                                                             
    2139 nginx     10 -10  180424  29444   2856 S   0.3  1.6   0:06.77 nginx: worker process                                                                                                                                                             
    20034 mysql     15  -5  462220 142436   9448 S   0.3  7.6   0:04.65 /usr/sbin/mysqld 
    Committed change for CentOS 7 only at update inc/mariadb_upgrade101.inc · centminmod/centminmod@d7afca6 · GitHub :)

    CentOS 6 doesn't have this issue as Centmin Mod out of box raises system wide open file limits to 262144, so /etc/my.cnf is free to adjust open files limit in [mysqld_safe] section from default 8192 set out of box Centmin Mod installs all the way up to 262144.
     
    Last edited: Dec 20, 2015
  2. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:09 PM
    1.9.10
    10.1.11
    So we are waiting to your update for 123.09beta01 :D
     
  3. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    6:09 PM
    Mainline
    10.2
    Nice!
    So to apply on my own server:

    rm -rf /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf

    nano /etc/systemd/system/mariadb.service.d/mdb101.conf
    With this content:
    Then:
    systemctl daemon-reload
    service mysql restart

    Right? :D
     
  4. eva2000

    eva2000 Administrator Staff Member

    55,917
    12,281
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,868
    Local Time:
    8:09 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yup for CentOS 7 only :)
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,917
    12,281
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,868
    Local Time:
    8:09 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    oh remove + plus signs though
    Code:
    [Service]
    OOMScoreAdjust=-600
    LimitNOFILE=262144
    LimitNPROC=16384
    Nice=-5
     
  6. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    6:09 PM
    Mainline
    10.2
    Yeah, just notice it now :D
     
  7. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    6:09 PM
    Mainline
    10.2
    Done :)
    Thanks Eva.
    [​IMG]
     
  8. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:09 PM
    1.9.10
    10.1.11
    I' ve upgraded my mariadb 10.x to 10.1 too and i have no problem at this time for my xenforo big board and wordpress blogs on my tests.

    Thank you.
     
  9. Matt Williams

    Matt Williams WordPress Fanatic

    537
    104
    43
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +157
    Local Time:
    6:09 AM
    latest
    10
    I've updated numerous WP sites to 10.1 without issue. (y)
     
  10. eva2000

    eva2000 Administrator Staff Member

    55,917
    12,281
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,868
    Local Time:
    8:09 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  11. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:09 PM
    1.9.10
    10.1.11
    MariaDB 10.1.10 has been released

    MariaDB 10.1.10 Changelog - MariaDB Knowledge Base
    Fixed too many bugs

    But i upgraded from yum and occured problem
    Code:
    [root@snc723 ~]# service mysql status
    ERROR! MySQL is running but PID file could not be found
    [root@snc723 ~]# service mariadb restart
    Redirecting to /bin/systemctl restart  mariadb.service
    [root@snc723 ~]# service mysql status
    ERROR! MySQL is running but PID file could not be found
    Interesting that yum upgrade process didn't restart mysql server while upgrading the mariadb to 10.1.10
     
  12. eva2000

    eva2000 Administrator Staff Member

    55,917
    12,281
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,868
    Local Time:
    8:09 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  13. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:09 PM
    1.9.10
    10.1.11
    So, it isn't secure to upgrade the mariadb from yum update ? Because, this error occured with this way. Your centminmod mysql upgrade mod didn't do it. (10.0.x to 10.1.x)

    It may related due mysql server didn't restarted while upgrading via yum.

    Also, /var/log/mysqld.log is too old and not updated record. Should i add the error.log location to my.cnf ? Because it hasn't.
     
  14. eva2000

    eva2000 Administrator Staff Member

    55,917
    12,281
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,868
    Local Time:
    8:09 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    check the /var/lib/mysql/yourhostname.err error log too

    it's why i don't intend to touch MariaDB 10.1 until at least 10.1.13 :)
     
  15. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:09 PM
    1.9.10
    10.1.11
    I check that log too but it doen't updated with last errors. Mariadb maybe changed the log conditions because when i check this file, i see old record that. There are no details.
    Code:
    mysqld_safe mysqld from pid file /var/lib/mysql/yourhostname.pid ended
     
  16. eva2000

    eva2000 Administrator Staff Member

    55,917
    12,281
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,868
    Local Time:
    8:09 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    that may occur if the /etc/my.cnf centmin mod set is wiped so the custom error log directory in /etc/my.cnf doesn't exist so start up uses error log at it's default location. But that should be /var/lib/mysql/yourhostname.err or something
     
  17. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:09 PM
    1.9.10
    10.1.11
    Yes i see the error log file in /var/lib/mysql/hostname.err but it doesn't include the pid file failed details. Also i see pid file in same directory so what is problem i don't undetstand really :)

    I deleted the pid file and stop mysql then start, it still shows same error.
     
  18. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    12:09 PM
    1.9.9
    10.1.10
    Upgraded two servers from 10.1.9 to 10.1.10 using yum, no problems :)
     
  19. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    12:09 PM
    1.9.9
    10.1.10
    Oh and btw. there is a problem with using
    Code:
    service mysql status
    when running CentOS 7, there is a bug report for it already if I recall right. Try
    Code:
    service mariadb status
    @negative
     
  20. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:09 PM
    1.9.10
    10.1.11
    I found that bug report, yes you may right.
    [MDEV-9227] Both CentOS service names mysql and mariadb exist ? - JIRA

    So, if you type the "service mysql status" command you see same pid file error ?

    When i check the service mariadb status then it shows
    Code:
    [root@snc723 ~]# service mariadb status
    Redirecting to /bin/systemctl status  mariadb.service
    ● mariadb.service - MariaDB database server
       Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
      Drop-In: /etc/systemd/system/mariadb.service.d
               └─mdb101.conf, migrated-from-my.cnf-settings.conf
       Active: active (running) since Sat 2015-12-26 14:20:02 EET; 10h ago
    Main PID: 30241 (mysqld)
       Status: "Taking your SQL requests now..."
       CGroup: /system.slice/mariadb.service
               └─30241 /usr/sbin/mysqld
    
    Dec 26 14:20:02 snc723.dgn.net.tr mysqld[30241]: 2015-12-26 14:20:02 140213061912320 [Note] InnoDB: Dumping buf...rted
    Dec 26 14:20:02 snc723.dgn.net.tr mysqld[30241]: 2015-12-26 14:20:02 7f85e5bf8700 InnoDB: Loading buffer pool(s...pool
    Dec 26 14:20:02 snc723.dgn.net.tr mysqld[30241]: 2015-12-26 14:20:02 140223651465344 [Note] Plugin 'FEEDBACK' i...led.
    Dec 26 14:20:02 snc723.dgn.net.tr mysqld[30241]: 2015-12-26 14:20:02 140223651465344 [Note] Server socket creat...::'.
    Dec 26 14:20:02 snc723.dgn.net.tr mysqld[30241]: 2015-12-26 14:20:02 140223651465344 [Warning] 'user' entry 'ro...ode.
    Dec 26 14:20:02 snc723.dgn.net.tr mysqld[30241]: 2015-12-26 14:20:02 140223651465344 [Warning] 'proxies_priv' e...ode.
    Dec 26 14:20:02 snc723.dgn.net.tr mysqld[30241]: 2015-12-26 14:20:02 140223651465344 [Note] /usr/sbin/mysqld: r...ons.
    Dec 26 14:20:02 snc723.dgn.net.tr mysqld[30241]: Version: '10.1.10-MariaDB-log'  socket: '/var/lib/mysql/mysql....rver
    Dec 26 14:20:02 snc723.dgn.net.tr systemd[1]: Started MariaDB database server.
    Dec 26 14:20:22 snc723.dgn.net.tr mysqld[30241]: 2015-12-26 14:20:22 7f85e5bf8700 InnoDB: Buffer pool(s) load c...0:22
    Hint: Some lines were ellipsized, use -l to show in full.
    
    Btw, my other server is mariadb 10.1-9 and mysql status doesn't show this error. This happen on 10.1-10 just.