Thanks to all the replies. I will answer/comment on the last few emails in this one.
Our application has nothing to do with storing images in the database. All the upload servlet does is saves the data to a file on the file system. The size of the files vary and are not in our control. They could be as big as a 1gb. As far as changing the session timeout from the servlet, I do not think it works well when multiple uploads are going simultaneously under one session, if we reset (we must, we cannot leave the timeout at infinity) the timeout to normal value after each upload. I tried this some time ago and it gets crazy with the concurrency and I'm not sure if that's the way to do it. I just ran a test with a session timeout set to 30 seconds, and uploading a 800MB file that takes longer than 30 seconds. Below are some debug lines: Fri Jul 08 15:03:18 CDT 2011 Session created: E213791CFB9AD89B0C3DCB63AFBDAAF3 Fri Jul 08 15:03:18 CDT 2011 Timeout on session E213791CFB9AD89B0C3DCB63AFBDAAF3 is set to 30 Fri Jul 08 15:03:33 CDT 2011 Upload Servlet received the request Fri Jul 08 15:04:11 CDT 2011 Session destoryed: E213791CFB9AD89B0C3DCB63AFBDAAF3 Fri Jul 08 15:05:15 CDT 2011 Upload Servlet finished processing the request After the upload servlet was hit, the session destroyed 38 seconds later. Not sure why it is not exactly 30. All 800MB still made it to the server. But the next requests require re-login as the session was destroyed. The session created, the timeout setting and the session destroyed messages are logged from the session listener. And finally, what is the use of "disableUploadTimeout" on tomcat's connector? Is it for session timeout or the actual socket timeouts? Thanks in advance for any other input/ideas you may have to offer. Sai Pullabhotla On Fri, Jul 8, 2011 at 2:20 PM, Caldarale, Charles R <chuck.caldar...@unisys.com> wrote: >> From: Sai Pullabhotla [mailto:sai.pullabho...@jmethods.com] >> Subject: Re: Uploading large files and session timeout > >> As far as I know, the session's lastAccessTime gets updated on each >> request from the client (by the container), and there is no public API >> to update the last access time. > > Your servlet could call HttpSession.setMaxInactiveInterval() as needed to > prevent a timeout. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you received > this in error, please contact the sender and delete the e-mail and its > attachments from all computers. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org