If the loader crashes during an operation, the nserv process will be left in exclusive mode, disallowing all attempted client connections. In this situation, you must kill the nserv process to put the database back into a stable state. This is as designed.
Memory Allocation Problems
If the input record size is very small and the user manually sets a large amount of memory for the input buffer with the ndlm -f option flag, the load operation could fail with a memory allocation error. This is because a small amount of overhead memory is required per record in the buffer. If the buffer stores a huge number of narrow records (as opposed to a small number of wide records, or a moderate number of medium-sized records), a substantial amount of overhead memory can accumulate, which can contribute to exhausting the system resources.
Therefore, when the input record size is quite small, it is best to let ndlm set the input buffer automatically.
Minimum ulimit Settings (UNIX only)
The following are the minimum operating system ulimit values required to run ndlm:
- data segment size (in kilobytes): 1048576
- stack size (in kilobytes): 1024
- number of open files (descriptors): 256
If any of the actual ulimit settings is below the minimum requirement, ndlm will return an "Insufficient resources" error message in the case of data segment size or number of open files, and the operating system will return its own error message(s) in the case of stack size.
To view the current ulimit settings, enter the following shell command:
If necessary, the ulimit values for the current execution environment can be increased by a user with ROOT privileges.
To increase the limit for the data segment, use the following command:
ulimit -d n
n is the new limit for the data segment (in kilobytes)
To increase the limit for the stack, use the following command:
ulimit -s n
n is the new limit for the stack (in kilobytes)
To increase the limit for the number of open files, use the following command:
ulimit -n n
n is the new limit for the number of open files
ulimit -d 29360128
ulimit -s 32768
ulimit -n 1000
After these commands are executed, the data segment limit will be 29,360,128 KB, the stack limit will be 32,768 KB, and the maximum number of open files per process will be 1000.