Fix application log viewing errors in EDAS

更新时间:
复制 MD 格式

When you view application logs in the Enterprise Distributed Application Service (EDAS) console, the log viewer may fail to load with an error. This happens because the EDAS agent cannot start the threads required to retrieve and display logs.

Note This issue has been fixed in the latest version of the EDAS agent. If you are running the latest agent, you should not encounter this error. The manual fix below applies to older agent versions.

Cause

The ulimit value on the host machine is set too low. The nproc parameter, which is controlled through ulimit, defines the maximum number of processes and threads a user can create. When this value is too low, the threads fail to start, which causes the log viewer to fail.

Solution

Raise the nproc limit for the admin user by editing the system limits configuration file.

  1. Open /etc/security/limits.d/20-nproc.conf in a text editor:

    sudo vi /etc/security/limits.d/20-nproc.conf
  2. Add the following line to remove the process limit for the admin user:

    FieldValueDescription
    adminUser nameThe Linux user under which the EDAS agent runs
    softLimit typeThe soft limit, which can be raised up to the hard limit
    nprocResourceMaximum number of processes and threads the user can create
    unlimitedValueRemoves the cap on thread creation
    admin soft nproc unlimited
  3. Run the following command to reload kernel parameters:

    sysctl -p &> /dev/null
  4. (Optional) Restart the EDAS agent to make sure it picks up the new limit.

Verify the fix

  1. Confirm the new limit is active: The output should show unlimited.

    su - admin -c "ulimit -u"
  2. Open the EDAS console, navigate to your application, and open the log viewer. The application logs should now load without errors.

What to do if the issue persists

  • Upgrade the EDAS agent to the latest version. The root cause has been fixed in newer releases, which eliminates the need for the manual workaround.

  • Check other system limits. Run ulimit -a as the admin user to review all resource limits and confirm no other limit is blocking thread creation.

  • If the error continues after trying these steps, contact EDAS technical support with the output of ulimit -a and the EDAS agent version for further diagnosis.