Bug 178940 - nscd: no more memory for database
nscd: no more memory for database
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-25 12:00 EST by Rex Dieter
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-15 14:39:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rex Dieter 2006-01-25 12:00:18 EST
# rpm -q nscd
nscd-2.3.4-2.13

On a mailserver of ours, I'm seeing *lots* of
Jan 24 21:29:00 mail nscd: 22890 no more memory for database 'hosts'
in /var/log/messages over the past few days

May be related to google search hit on same/similar error:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=1204

In the meantime, I've modified /etc/nscd.conf host section
-suggested-size          hosts           211
+suggested-size          hosts           419
and issued 
/sbin/service nscd restart
to see if that helps.

Eerie output of nscd -g (note the high "memory allocation failed" count):
...
hosts cache:
            yes  cache is enabled
            yes  cache is persistent
            yes  cache is shared
            211  suggested size
         216064  total data pool size
          12944  used data pool size
           3600  seconds time to live for positive entries
             20  seconds time to live for negative entries
           4087  cache hits on positive entries
           5837  cache hits on negative entries
         202366  cache misses on positive entries
          99294  cache misses on negative entries
              3% cache hit rate
             94  current number of cached values
           1568  maximum number of cached values
             20  maximum chain length searched
              0  number of delays on rdlock
              0  number of delays on wrlock
          51264  memory allocations failed
            yes  check /etc/hosts for changes
Comment 1 Rex Dieter 2006-01-25 12:05:17 EST
During periods where this error occurs, some samba shares exported from this 
same box become unresponsive/slow with (some?) windows clients 
receiving "delayed write failed" errors related to (op)locked files.
Comment 2 Rex Dieter 2006-01-25 12:10:08 EST
Hmm... my new 'suggested-size' didn't take until I cleared the db files 
in /var/db/nscd.

Perhaps these db files should be cleared when the service is stopped.
Comment 3 Rex Dieter 2006-01-26 09:42:00 EST
Now, getting the same error for passwd too:

Jan 26 05:16:27 xxx nscd: 14200 no more memory for database 'passwd'
Jan 26 05:16:58 xxx nscd: 14200 no more memory for database 'passwd'
Jan 26 05:17:31 xxx nscd: 14200 no more memory for database 'passwd'
Comment 4 Jakub Jelinek 2006-03-15 14:39:38 EST
If the database is persistent (as requested in the config file, RHEL4 default),
then it of course should not be cleared.
You need to
/usr/sbin/nscd -i hosts -i passwd -i group
it manually.
Comment 5 Rex Dieter 2006-03-16 11:34:13 EST
Are you suggesting that the /var/log/messages errors:
Jan 24 21:29:00 mail nscd: 22890 no more memory for database 'hosts'
and nscd -g output saying:
51264  memory allocations failed
are by design and NOTABUG?  (I seriously hope not)

Note You need to log in before you can comment on or make changes to this bug.