Troubleshooting
Problem
While executing ls command on a filesystem or a directory that has a lot of contents, the following error message appears, and the command doesn't execute.
# ls /tmp
ls: 0653-340 There is not enough memory available now.
Symptom
Running ls command in a filesystem or a directory that has a lot of contents can throw the following error:
ls: 0653-340 There is not enough memory available now.
However, running it in any other location in the system, works fine.
Cause
The main cause of this issue is the congestion of the data processed during the execution of the command. When it comes to listing a lot of files and directories in the filesystem or directory, congestion happens, which is due to the data limit in the /etc/security/limits file.
For example:
default:
fsize = 2097151
core = 2097151
cpu = -1
data = 262144
rss = 65536
stack = 65536
nofiles = 2000
In the following example, you can see the default entry in the /etc/security/limits file has a data attribute, and the data attribute has the following value: 262144, which is 262144 KiloBytes, to be converted into 262.144 MB, so the data stream that is going to be processed by the ls command will be 262.144 MB
This will cause congestion for the data that will be processed, especially if the current working directory you are in has a lot of files and directories.
Diagnosing The Problem
Examining the data attribute in the default entry in the /etc/security/limits
Resolving The Problem
To resolve the issue, you will need to change the data limit from 0.262144 MB to unlimited, this will increase the data stream that is passed to the ls command to be processed. You can achieve this using the following command:
# ulimit -d unlimited
data = 262144 are 512-byte blocks, so that is 134217728 bytes, or 128 MB.
It's worth mentioning that changing the default stanza doesn't suffice if the stanza for a user has a different value set, if a specific user faces the error message while executing ls command, you will need to change the data attribute's value using root privileges by executing the following command:
#chuser data=unlimited <username>
Where <username> is the name of the user that encounters the issue.
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z000000cvzgAAA","label":"Commands"},{"code":"a8m0z000000cvyiAAA","label":"LVM"}],"ARM Case Number":"TS020424124","Platform":[{"code":"PF002","label":"AIX"}],"Version":"5.3.0;6.1.0;7.1.0;7.2.0;7.3.0"}]
Was this topic helpful?
Document Information
Modified date:
08 October 2025
UID
ibm17247030