Learn about Centmin Mod LEMP Stack today
Become a Member

Sysadmin RPMDB Lots of errors

Discussion in 'System Administration' started by gamal, Jul 12, 2020.

Tags:
  1. gamal

    gamal Member

    97
    8
    8
    Jan 31, 2018
    Ratings:
    +11
    Local Time:
    6:01 PM
    1.13.8
    i have these kind of errors whenever i try to invoke any kind of centminmod commands:

    Code:
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages database in /var/lib/rpm
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    CRITICAL:yum.main:
    
    Error: rpmdb open failed
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages database in /var/lib/rpm
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages database in /var/lib/rpm
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    CRITICAL:yum.main:
    
    Error: rpmdb open failed
    
    real    0m0.197s
    user    0m0.122s
    sys     0m0.063s
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    CRITICAL:yum.cli:Yum Error: Error: rpmdb open failed
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages database in /var/lib/rpm
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    CRITICAL:yum.main:
    
    Error: rpmdb open failed
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    CRITICAL:yum.main:
    
    Error: rpmdb open failed
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages database in /var/lib/rpm
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    CRITICAL:yum.main:
    
    Error: rpmdb open failed
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages database in /var/lib/rpm
    error: rpmdb: BDB0113 Thread/process 4113/140528502323264 failed: BDB1507 Thread died in Berkeley DB library
    error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db5 -  (-30973)
    error: cannot open Packages database in /var/lib/rpm
    CRITICAL:yum.main:
    
    Error: rpmdb open failed
    
    is there any fix for this and what is the cause ?

    regards
     
  2. eva2000

    eva2000 Administrator Staff Member

    44,780
    10,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,828
    Local Time:
    6:01 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    what is output for these 2 commands
    Code (Text):
    free -mlt

    Code (Text):
    cminfo sar-mem

    how much memory do you have installed/free? CentOS 7 needs at least 1-2GB memory to probably run YUM

    you can try rebuilding your YUM database files
    Code (Text):
    DT=$(date +"%d%m%y-%H%M%S")
    mkdir -p /home/backup_rpmdb_$DT
    cp -avr /var/lib/rpm/ /home/backup_rpmdb_$DT/
    rm -f /var/lib/rpm/__db*
    db_verify /var/lib/rpm/Packages
    rpm --rebuilddb
    yum clean all
    
     
  3. gamal

    gamal Member

    97
    8
    8
    Jan 31, 2018
    Ratings:
    +11
    Local Time:
    6:01 PM
    1.13.8
    Code:
                  total        used        free      shared  buff/cache   available
    Mem:           1837         794         137         101         905         679
    Low:           1837        1699         137
    High:             0           0           0
    Swap:           510         186         324
    Total:         2348         980         462
    
    Code:
    cminfo sar-mem
    
    ------------------------------------------------------------------
     Memory Usage Daily Last 7 days (1 CPU Threads):
    ------------------------------------------------------------------
    
    Jul 12 2020 Memory
    Memory      min:
    kbmemfree:  83656.0    kbmemused:  607664.0   %memused:  32.3       kbbuffers:  2760.0    kbcached:  133012.0
    kbcommit:   1261684.0  %commit:    52.5       kbactive:  233304.0   kbinact:    134904.0  kbdirty:   0.0
    Memory      avg:
    kbmemfree:  434872.8   kbmemused:  1447155.2  %memused:  76.9       kbbuffers:  91215.2   kbcached:  262323.5
    kbcommit:   1982098.5  %commit:    82.4       kbactive:  800385.2   kbinact:    321459.7  kbdirty:   666.5
    Memory      max:
    kbmemfree:  1274364.0  kbmemused:  1798372.0  %memused:  95.6       kbbuffers:  317736.0  kbcached:  523932.0
    kbcommit:   3058920.0  %commit:    127.2      kbactive:  1448496.0  kbinact:    455552.0  kbdirty:   11880.0
    Memory      95%:
    kbmemfree:  1120573.0  kbmemused:  1767608.2  %memused:  93.9       kbbuffers:  310479.4  kbcached:  458680.4
    kbcommit:   2967748.8  %commit:    123.4      kbactive:  1264230.2  kbinact:    445909.8  kbdirty:   2050.8
    
    Jul 11 2020 Memory
    Memory      min:
    kbmemfree:  72844.0    kbmemused:  423356.0   %memused:  22.5       kbbuffers:  116.0     kbcached:  89632.0
    kbcommit:   1080876.0  %commit:    44.9       kbactive:  229272.0   kbinact:    65180.0   kbdirty:   0.0
    Memory      avg:
    kbmemfree:  368014.8   kbmemused:  1514013.2  %memused:  80.4       kbbuffers:  72315.5   kbcached:  323737.0
    kbcommit:   1841585.3  %commit:    76.6       kbactive:  750890.9   kbinact:    362317.1  kbdirty:   844.9
    Memory      max:
    kbmemfree:  1458672.0  kbmemused:  1809184.0  %memused:  96.1       kbbuffers:  349388.0  kbcached:  927912.0
    kbcommit:   3436696.0  %commit:    142.9      kbactive:  1483936.0  kbinact:    653900.0  kbdirty:   36552.0
    Memory      95%:
    kbmemfree:  877201.8   kbmemused:  1790012.6  %memused:  95.1       kbbuffers:  150089.8  kbcached:  746972.0
    kbcommit:   3206058.4  %commit:    133.3      kbactive:  1259933.2  kbinact:    598678.4  kbdirty:   1122.8
    
    Jul 10 2020 Memory
    Memory      min:
    kbmemfree:  72896.0    kbmemused:  574184.0   %memused:  30.5       kbbuffers:  1200.0    kbcached:  107804.0
    kbcommit:   1156092.0  %commit:    48.1       kbactive:  177784.0   kbinact:    95352.0   kbdirty:   0.0
    Memory      avg:
    kbmemfree:  482339.5   kbmemused:  1399688.5  %memused:  74.4       kbbuffers:  92027.9   kbcached:  344926.8
    kbcommit:   1657472.4  %commit:    68.9       kbactive:  639604.7   kbinact:    357061.0  kbdirty:   1684.6
    Memory      max:
    kbmemfree:  1307844.0  kbmemused:  1809132.0  %memused:  96.1       kbbuffers:  309504.0  kbcached:  1228436.0
    kbcommit:   3381004.0  %commit:    140.6      kbactive:  1303780.0  kbinact:    843704.0  kbdirty:   109436.0
    Memory      95%:
    kbmemfree:  1016357.0  kbmemused:  1795721.8  %memused:  95.4       kbbuffers:  220179.8  kbcached:  589993.0
    kbcommit:   2919587.8  %commit:    121.4      kbactive:  1229187.8  kbinact:    574205.2  kbdirty:   1854.0
    
    Jul 09 2020 Memory
    Memory      min:
    kbmemfree:  72808.0    kbmemused:  802100.0   %memused:  42.6       kbbuffers:  1360.0    kbcached:  110612.0
    kbcommit:   1104692.0  %commit:    45.9       kbactive:  173420.0   kbinact:    65672.0   kbdirty:   0.0
    Memory      avg:
    kbmemfree:  396555.5   kbmemused:  1485472.5  %memused:  78.9       kbbuffers:  95806.8   kbcached:  321815.6
    kbcommit:   1547605.1  %commit:    64.3       kbactive:  515059.1   kbinact:    396858.3  kbdirty:   688.8
    Memory      max:
    kbmemfree:  1079928.0  kbmemused:  1809220.0  %memused:  96.1       kbbuffers:  325852.0  kbcached:  663752.0
    kbcommit:   3502548.0  %commit:    145.6      kbactive:  1294336.0  kbinact:    609440.0  kbdirty:   49304.0
    Memory      95%:
    kbmemfree:  663418.4   kbmemused:  1783913.6  %memused:  94.8       kbbuffers:  208557.6  kbcached:  536293.6
    kbcommit:   2845731.2  %commit:    118.3      kbactive:  1122587.2  kbinact:    531448.8  kbdirty:   1468.0
    
    Jul 08 2020 Memory
    Memory      min:
    kbmemfree:  72864.0    kbmemused:  306880.0   %memused:  16.3       kbbuffers:  452.0     kbcached:  78444.0
    kbcommit:   975676.0   %commit:    40.6       kbactive:  111460.0   kbinact:    84568.0   kbdirty:   0.0
    Memory      avg:
    kbmemfree:  360344.3   kbmemused:  1521705.7  %memused:  80.9       kbbuffers:  65883.2   kbcached:  245631.3
    kbcommit:   2208807.6  %commit:    91.8       kbactive:  843078.8   kbinact:    381090.8  kbdirty:   902.5
    Memory      max:
    kbmemfree:  1575148.0  kbmemused:  1809208.0  %memused:  96.1       kbbuffers:  347060.0  kbcached:  497856.0
    kbcommit:   3493500.0  %commit:    145.2      kbactive:  1450116.0  kbinact:    664788.0  kbdirty:   72976.0
    Memory      95%:
    kbmemfree:  1270277.2  kbmemused:  1805905.4  %memused:  96.0       kbbuffers:  263706.8  kbcached:  453091.2
    kbcommit:   3259990.6  %commit:    135.5      kbactive:  1306543.2  kbinact:    500135.4  kbdirty:   1731.6
    
    Jul 07 2020 Memory
    Memory      min:
    kbmemfree:  98588.0    kbmemused:  1298396.0  %memused:  69.0      kbbuffers:  10564.0   kbcached:  241052.0
    kbcommit:   1280908.0  %commit:    53.2       kbactive:  148036.0  kbinact:    392396.0  kbdirty:   0.0
    Memory      avg:
    kbmemfree:  278645.8   kbmemused:  1603426.2  %memused:  85.2      kbbuffers:  94407.6   kbcached:  364410.4
    kbcommit:   1472207.8  %commit:    61.2       kbactive:  395259.2  kbinact:    536111.1  kbdirty:   505.9
    Memory      max:
    kbmemfree:  583676.0   kbmemused:  1783484.0  %memused:  94.8      kbbuffers:  313296.0  kbcached:  691856.0
    kbcommit:   1871516.0  %commit:    77.8       kbactive:  763544.0  kbinact:    735936.0  kbdirty:   20628.0
    Memory      95%:
    kbmemfree:  503582.4   kbmemused:  1739436.8  %memused:  92.4      kbbuffers:  220896.8  kbcached:  466264.0
    kbcommit:   1552619.2  %commit:    64.5       kbactive:  550431.2  kbinact:    662288.8  kbdirty:   1536.8
    
    Jul 06 2020 Memory
    Memory      min:
    kbmemfree:  98276.0    kbmemused:  819300.0   %memused:  43.5       kbbuffers:  7476.0    kbcached:  220460.0
    kbcommit:   1377188.0  %commit:    57.3       kbactive:  286372.0   kbinact:    185608.0  kbdirty:   0.0
    Memory      avg:
    kbmemfree:  244704.8   kbmemused:  1637367.2  %memused:  87.0       kbbuffers:  138267.4  kbcached:  437585.9
    kbcommit:   1509525.3  %commit:    62.8       kbactive:  508153.3   kbinact:    541619.5  kbdirty:   494.4
    Memory      max:
    kbmemfree:  1062772.0  kbmemused:  1783796.0  %memused:  94.8       kbbuffers:  327288.0  kbcached:  752060.0
    kbcommit:   3059560.0  %commit:    127.2      kbactive:  1177884.0  kbinact:    848044.0  kbdirty:   13388.0
    Memory      95%:
    kbmemfree:  617863.2   kbmemused:  1748273.2  %memused:  92.9       kbbuffers:  291523.2  kbcached:  679702.8
    kbcommit:   1594158.0  %commit:    66.3       kbactive:  732648.8   kbinact:    686171.6  kbdirty:   1772.4
    
    Jul 05 2020 Memory
    Memory      min:
    kbmemfree:  102956.0   kbmemused:  1337412.0  %memused:  71.1      kbbuffers:  21776.0   kbcached:  275148.0
    kbcommit:   1377064.0  %commit:    57.2       kbactive:  289848.0  kbinact:    422880.0  kbdirty:   0.0
    Memory      avg:
    kbmemfree:  209797.9   kbmemused:  1672274.1  %memused:  88.9      kbbuffers:  115715.3  kbcached:  436452.9
    kbcommit:   1486023.7  %commit:    61.8       kbactive:  475689.1  kbinact:    550941.1  kbdirty:   420.2
    Memory      max:
    kbmemfree:  544660.0   kbmemused:  1779116.0  %memused:  94.5      kbbuffers:  301152.0  kbcached:  667496.0
    kbcommit:   1787936.0  %commit:    74.3       kbactive:  620304.0  kbinact:    666832.0  kbdirty:   25804.0
    Memory      95%:
    kbmemfree:  311738.0   kbmemused:  1750322.0  %memused:  93.0      kbbuffers:  204468.8  kbcached:  621064.4
    kbcommit:   1535720.8  %commit:    63.8       kbactive:  571398.8  kbinact:    650515.2  kbdirty:   833.6
    
     
  4. eva2000

    eva2000 Administrator Staff Member

    44,780
    10,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,828
    Local Time:
    6:01 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    At your peaks i.e. max/95% percentile you're using the upper limit of memory so close.

    Do you have automatic YUM updates or centmin mod auto update enabled ?
     
  5. gamal

    gamal Member

    97
    8
    8
    Jan 31, 2018
    Ratings:
    +11
    Local Time:
    6:01 PM
    1.13.8
    i run the commands you mentioned before, how do i know if i have automatic update enabled ?
     
  6. eva2000

    eva2000 Administrator Staff Member

    44,780
    10,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,828
    Local Time:
    6:01 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    If you haven't specifically configured it as such they you don't have auto updates enabled.
     
  7. gamal

    gamal Member

    97
    8
    8
    Jan 31, 2018
    Ratings:
    +11
    Local Time:
    6:01 PM
    1.13.8
    so is there a solution to this peaks, my websites keep getting (
    This site can’t be reached
    ERR_TIMED_OUT
    )

    after nprestart work for a while and then the same message again

    also ssh became extremely slow ?
     
  8. eva2000

    eva2000 Administrator Staff Member

    44,780
    10,212
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,828
    Local Time:
    6:01 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    hard to know if the issues are related or what is the issue, you'd need to investigate this yourself

    who's your web host and what plan are you on ? Could be the server / VPS itself. You can try moving your site to a new VPS/server
     
  9. gamal

    gamal Member

    97
    8
    8
    Jan 31, 2018
    Ratings:
    +11
    Local Time:
    6:01 PM
    1.13.8
    great i was planning to do so, thx for the advice...