DFC session count

Is there a way to count number of sessions in DFC client? I know we can set the max_count in dfc.properties which should never exceed number of sessions set in server.ini.
In the Method Server, can we count those DFC active sessions?
In a custom client DFC program, can we count number of active DFC sessions.

I know about the list_sessions, show_sessions, but that is on the CS side.

Comments

  • I believe max_count has to do with max count on the server, not DFC client. You can try IDfSessionManager.getStatistics().

  • Thank you DCTM_Guru. The issue we are having is JMS suddenly throwing that error. So it must be one of the jobs. So I would like to see if it is possible to check number of DFC sessions used by JMS, not by my custom code.

  • DCTM_Guru
    edited December 8, 2018 #4

    If its JMS, it should not be having session issues b/c jobs are normally executed by install owner account. What is the exact error? How are you getting a session in your custom code? Also, are you closing/releasing the session in your custom code at the end of your custom code?

  • -Error happens every few days (details at the bottom of the message):
    DM_API_E_NO_SESSION]error: "There are no more available sessions."
    -Added dfc.resources.diagnostics.enabled=true in dfc.properties
    -After enablded diagnostics, got the following every few minutes
    17:42:11,976 ERROR [Resource Housekeeper] com.documentum.fc.client.impl.session.StrongSessionHandle$DisposableData - [DFC_SESSION_NOT_RELEASED] Unreleased session found during garbage collection, Session{id=2, iid=134, serial=2, docbase=DEV_CMS_ADMIN, user=dmadmin, serversession=none}
    com.documentum.fc.impl.util.ThrowableStack: Stack when session was obtained
    at com.documentum.fc.client.DfSingleDocbaseModule.getSession(DfSingleDocbaseModule.java:58)

    -We are getting this error in our Dev with upgraded D2 16.4
    -We are worried if we push to prod, we end up with similar problem

    DETAILS:
    2018-12-07 12:38:26 [ERROR] [http-0.0.0.0-0.0.0.0-9080-1] - c.e.d.a.m.D2Method[com.emc.d2.api.methods.D2EventSenderMailMethod] : {}
    com.documentum.fc.client.DfServiceException: [DM_API_E_NO_SESSION]error: "There are no more available sessions."
    at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionManager.getConnectionFromPool(DocbaseConnectionManager.java:168)
    at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionManager.getDocbaseConnection(DocbaseConnectionManager.java:94)

  • The error message from JMS does not mean that the D2EventSenderMailMethod is causing the problem; it just means that when it tried to get a session, no more sessions were available. To try to figure out where are the open sessions getting created, goto DA, under User Management->Sessions, you can see the details of sessions opened. You may be able to correlate when the start time of the sessions with when specific jobs/methods are getting run. This will help you isolate which method is not properly closing/releasing sessions back into pool (per my previous reply).

  • Based on the DFC_SESSION_NOT_RELEASED message pointing to com.documentum.fc.client.DfSingleDocbaseModule.getSession, I suspect you may be hitting a known issue. Are you using RPS?
    We have seen issues with disposition which were corrected in latest releases. Refer to RETPOL-7963

    Russell Kavanagh
    Documentum SME | Opentext

  • No we are not using RPS. All the RPS jobs are 'inactive'. What is the known issue? we are upgrading to 16.4 (CS and D2 .. etc)

    I am guessing there is no way to count how many sessions are used by JMS at a specific point.

    In our Dev environment (that is throwing the "no more sessions" error), we turned placed dfc.resources.diagnostics.enabled=true
    and we started to notice error below every few minutes
    DFC_SESSION_NOT_RELEASED.

    Is there anything I can keep collecting that will help me pinpoint the culprit (like using Java debug utils?) and should I look for in the Java debug utils.

    I don't want to go to only recommend restart of JMS every night.

  • Did you review custom job/methods to see if you are releasing session properly?

  • We are going through upgrade of D2. The upgrade is the main difference between the DEV (which is having 'no more sessions') and the PROD (which is good for now). There is no change in the custom code.
    dfc files don't specify explicitly use the max_count (so it is using the default 1000).

    We are trying to narrow down the issue, but it is very hard. One of the suspicious jobs is D2JobWFReceiveTaskMail, but can't confirm.

  • Disable the job and see if your session count keeps going up or not

  • We were debating that. The challenge is that it takes long to have the issue. The real culprit isn't generating the problem quickly, so we have to wait for each job on for few days. We can reduce the max_count to speed up the occurrence of 'no more sessions'.

    With your expertise, if you think of some 'workaround' that can detect this problem, let me know please.

    FYI, I turned on Java profiler and noticed that diagnostics exception is thrown when the garbage collection is happening.

  • I'm not J2EE developer, so I don't know low level debugging tricks :) As I said before, you can examine how sessions are being created in DA. Count how many sessions are running before a job starts running and then what is the count after the job completes. The sessions created by normal users will have a different session source then sessions created from JMS (b/c they are running on app server vs CS).

  • @Sammtl Did you manage to solve the problem?

  • Hi Sammtl - did you resolve your issue with "There are no more available sessions.".  We're on LSRD 16.4 and facing the same issue.