Issue

The log files contains the error, "Too many files," and AEM doesn't respond.

Solution

Increase the maximum number of open files configuration.

Certain AEM operations require the system to have more open files configured. For example, reindexing the lucene index can require you to increase the maximum open file settings.

Increase the open file limit for the AEM shell session

Check the user's limit for maximum open files, and then run the following as the same user that AEM process runs as:

ulimit -Sn ulimit -Hn

When using the default start script of AEM/CQ, do the following to increase the limit:

  1. Open crx-quickstart/bin/start for editing
  2. Add the variable CQ_MAX_OPEN_FILES to the top of the script:

    CQ_MAX_OPEN_FILES=8192 export CQ_MAX_OPEN_FILES

If you see the error "-bash: ulimit: open files: cannot modify limit: Operation not permitted" when starting AEM, then the configuration above doesn't work.

Instead, it's necessary to increase the limit in /etc/security/limits.conf. See below for details on how to reconfigure the user limit.

If you are using a third-party application server such as JBoss or Websphere, follow the sections below and verify with the vendor's documentation.

Uwaga:

If none of the configurations in this article solve the problem, then see what files are open using the command lsof -p. (-p is the process id of the problematic process.) It could be that your application is leaving file handles open. If you see that the handles are being held mostly by AEM and not your application, then contact support.

Increase the user's limits

To change the maximum number of open files for non-root users, change the file /etc/security/limits.conf. You can set the limit on a per-user basis:

crx_process_username soft nofile 8092

crx_process_username hard nofile 20000

Uwaga:

This configuration doesn't take effect until the next time the user logs in.

Increase the system limit

Sometimes, the user limit is high enough, but the system itself has hit its maximum number of files. Run the following as su/root user:

  1. Check the max open file setting on the operating system (if it is below 20000, then it makes sense to increase this setting).

    cat /proc/sys/fs/file-max

  2. Add this line to /etc/sysctl.conf to increase the system open file maximum value:

    fs.file-max = 300000

  3. Run this command:

    sysctl -p

  4. Verify that the new value is displayed when you run this command:

    cat /proc/sys/fs/file-max

Uwaga:

This configuration doesn't take effect until the next time the user logs in.

Additional information

This error occurs when the system or user is using its maximum number file handles.

Pobierz

Ta zawartość jest licencjonowana na warunkach licencji Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Posty z serwisów Twitter™ i Facebook nie są objęte licencją Creative Commons.

Informacje prawne   |   Zasady prywatności online