GeeCON Prague 2014*
The moose likes Other JSE/JEE APIs and the fly likes session timeout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "session timeout" Watch "session timeout" New topic
Author

session timeout

Michael Waserman
Greenhorn

Joined: Jul 10, 2004
Posts: 28
What is a default for a session timeout.
I have an application that uploads huge files validating every record and sometimes it takes 30 - 40 min. users are complaining that application times out sometimes. What can I do for them before I found a solution to greatly increase performance?


Thanks. Mike.
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
What is a default for a session timeout.

That's a good question Which piece of software maintains the session?

I have an application that uploads huge files validating every record and sometimes it takes 30 - 40 min.

What takes 30-40 minutes? to upload the entire file? to validate one record while the upload session is open? How your app uploads the files? (through HTTP,FTP, or anything else)
Michael Waserman
Greenhorn

Joined: Jul 10, 2004
Posts: 28
The WEB server is Iplanet.
No Dmitry it's not FTP or HTTP. I called an upload the process which is represented by JSP-servlet-classes.
Java class validates every record and doing so makes 2-3 DB2 calls per record besides usual class, sign, number of chars validations. Valid records are inserted into DB2 table, invalid are thrown on JSP to be edited by the user. The entire file takes about 30-40 mins.

Thanks. Mike.
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
The WEB server is Iplanet.

Session timeout must be one of it's configuration parameters. Talk to people who configure it, or find a configuration manual.

it's not FTP or HTTP. I called an upload the process which is represented by JSP-servlet-classes.

Isn't it HTTP?

Java class validates every record and doing so makes 2-3 DB2 calls per record besides usual class, sign, number of chars validations. Valid records are inserted into DB2 table, invalid are thrown on JSP to be edited by the user. The entire file takes about 30-40 mins.

I would suggest making your servlet write into a log file operations' start-times and end-times, as well as time-stamps of sessions being open and closed. BTW, the servlet might be doing it already Analyse the logs and find out which operations cause those timeouts most often, make those operations log more details, etc. until you find a real bottle-neck or a bug.
Michael Waserman
Greenhorn

Joined: Jul 10, 2004
Posts: 28
Dmitry,
Are you saying that (8000 DB2 calls/connections + 2000 IMS calls through IMF transactions + normal validation routine) per session can not normally take 30-40 min???
I have thought that the problem is not a bug, but my poore design. Unfortunattelly, in my practice this application is one of a kind and I can not compare the time it runs to the other apps. Thanks for the advice to track the timestamps - I will definatelly try that.

Thanks. Michael.
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
Are you saying that (8000 DB2 calls/connections + 2000 IMS calls through IMF transactions + normal validation routine) per session can not normally take 30-40 min???

I am not saying that. I have absolutely no idea what is normal for your app, and what is not.
It might be written in your project requirements. Or might be not, and now the customer might be willing to add something

I think that changing the session timeout while you are investigating the issue might be useful.

I have thought that the problem is not a bug, but my poore design.

As far as I understood, you have a performance issue, right?
I would suggest you to find out what causes those ocasional performance degradations, and then decide
whether it requires a redesign, or a simple code change to resolve it.

Or you might find out that it's Ok to simply set a longer session timeout in your web-server configuration file,
and the problem (as you have described it) will go away.

Unfortunattelly, in my practice this application is one of a kind and I can not compare the time it runs to the other apps.

You can compare performance of your app against your customer's needs (present and/or future). If you find out that performance
needs improvement, then you better start thinking right now on how it could be improved I would start with discovering most
time-greedy operations

Thanks for the advice to track the timestamps - I will definatelly try that.

Good luck
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: session timeout