mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksandar " <aleksandar.valc...@gmail.com>
Subject Closing ssl sessions performance
Date Sun, 04 Feb 2007 01:11:41 GMT
Hi,
I have performance problems with mina and ssl filter.

When client's session idle about 30 seconds then session must be closed.
Everyting works fine when closing 300 sessions, but with 400 sessions system
usage goes to 100% and operating system crashes.

This is a snip code from my SessionHandler:
    public void sessionIdle(IoSession aSession, IdleStatus aIdleStatus)
    throws Exception {
        aSession.close();
    }

    public void sessionClosed(IoSession aSession)
    throws Exception {
        if (!SessionManager.isInformationSession(aSession)
                && !SessionUtil.isCommandSession(aSession)) {
            logger.warn("Closing undefined session!");
            sessionManager.removeSession(aSession);
            return;
        }

        if (SessionManager.isInformationSession(aSession)) {
            sessionManager.unregister(aSession);
        }
        if (SessionUtil.isCommandSession(aSession)) {
            String username = SessionUtil.getUsername(aSession);
            logger.info("Logout " + username);
        }

        Long id = SessionUtil.getSessionID(aSession);

        if (!sessionManager.removeSession(aSession)) {
            logger.error("Error removing session with id " + id);
        } else {
            logger.debug("Session with id " + id + " removed
seuccessfuly.");
        }
   }

Server has four Xeon 1.86GHz cpus.

Thanks in advance.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message