Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ending Diameter activity explicitly from SBB #8

Open
chathsuom opened this issue Apr 14, 2016 · 2 comments
Open

Ending Diameter activity explicitly from SBB #8

chathsuom opened this issue Apr 14, 2016 · 2 comments
Assignees

Comments

@chathsuom
Copy link

"One thing I have noted is that unless Diameter activities are ended by their state machine (e.g. a CCR-T message is received) the activities never expire and there is no way for the SBB to remove them.

In the event of (non-Mobicents!) Diameter clients malfunctioning or rebooting this can cause a memory leak.

e.g.
Diameter Gx Client sends CCR-INIT for a certain IP address with session ID ABC
Diameter Gx Client malfunctions and sends CCR-INIT for the same IP address with session ID DEF
Gx Client never every terminate session ID ABC and it stays forever and is never free-ed.

The SBB application actually knows that session ID ABC needs to be removed when it receives a CCR-INIT for the same IP.

If you edit the Diameter GX RA by adding to GxServerSessionActivityImpl.java:

public void delayedEndActivity() {
this.setTerminateAfterProcessing(true);
super.baseListener.startActivityRemoveTimer(getActivityHandle());

}

And to GxServerSessionActivity.java

void delayedEndActivity();

The SBB can explicitly end an activity if it needs to by calling delayedEndActivity on the activity.

This could be applied to all session based Diameter RAs"
This issue broghut here from jdiameter project issue log

xphudin pushed a commit to xphudin/jain-slee.diameter that referenced this issue Nov 7, 2016
@SergeyLee
Copy link
Contributor

Hi @chathsuom @brainslog !
Can we realize this ending on Diameter protocol level?
What about expiration (and expiration time)?
As I read spec 8.4. Session Termination:

When a user session that required Diameter authorization terminates,
the access device that provided the service MUST issue a Session-
Termination-Request (STR) message to the Diameter server that
authorized the service, to notify it that the session is no longer
active. An STR MUST be issued when a user session terminates for any
reason, including user logoff, expiration of Session-Timeout,
administrative action, termination upon receipt of an Abort-Session-
Request (see below), orderly shutdown of the access device, etc.

xphudin pushed a commit to xphudin/jain-slee.diameter that referenced this issue Jan 8, 2017
@richardgood
Copy link

Hi

Just to attach the diff for what I use successfully for Gx and Gy to achieve this simply.

On the expiration etc. I haven't got a solution there yet, but this works fine for explicitly end activities from the application level.

rx_gx_end_activity.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants