rpmdb: Lock table is out of available locker entries

If up2date throws some horrible Python errors and rpm says "rpmdb: Lock table is out of available locker entries", you can restore your system to normality with the following:

The errors:

rpmdb: Lock table is out of available locker entries
error: db4 error(22) from db->close: Invalid argument
error: cannot open Packages index using db3 - Cannot allocate memory (12)
error: cannot open Packages database in /var/lib/rpm

Make a backup of /var/lib/rpm in case you break something:

tar cvzf rpmdb-backup.tar.gz /var/lib/rpm

Remove the Berkeley databases that rpm uses:

rm /var/lib/rpm/__db.00*

Make rpm rebuild the databases from scratch (may take a short while):

rpm --rebuilddb

Now, check rpm to make sure everything is okay:

rpm -qa | sort

Why does this happen?
When rpm accesses the Berkeley database files, it makes temporary locker entries within the tables while it searches for data. If you control-c your rpm processes often, this issue will occur much sooner because the locks are never cleared.

Printed from: http://rackerhacker.com/2007/05/27/rpmdb-lock-table-is-out-of-available-locker-entries/ .
© Major Hayden 2012.

58 Comments   »

Trackbacks/Pingbacks

  1. RPM Database Rebuild at S C ^ 2
  2. 6log » Blog Archive
  3. evilrouters.net » Blog Archive » rpmdb: Lock table is out of available locker entries
  4. rpmdb: Lock table is out of available locker entries
  5. Recuperando base de dados RPM « Net Solution – Soluções Tecnológicas
  6. rpmdb: Lock table is out of available locker entries | Racker Hacker | Blog d'un Administrateur Système freelance qui fait de l'infogérance sous Linux Debian, Centos et Ubuntu

RSS feed for comments on this post

Leave a Reply

 

  • Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you find the information useful. If you spot something that's incorrect or confusing, please write a comment and let me know. Drop me a line if there's something you want to know more about and I'll do my best to write a post on the topic.
    -- Major Hayden

    Flattr this