tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thad Humphries <thad.humphr...@gmail.com>
Subject Re: Uploading large files and session timeout
Date Fri, 08 Jul 2011 19:17:13 GMT
So your images are being stored to a database. As blobs? That's a difference
between our apps: I store the images to a repository and keep a short record
of the in a database.

I can't advise you on Tomcat, but if the database is the bottleneck, a
workaround might be to write your images to temporary files, and use a
separate process to move those images into the database.

On Fri, Jul 8, 2011 at 3:03 PM, Sai Pullabhotla <
sai.pullabhotla@jmethods.com> wrote:

> Just to give more details...
>
> The session timeout setting is stored in our application's database.
> Admins can change the session timeout from the UI we provide. We did
> this to make it easy for our customers to set the desired timeout
> rather than telling them going into web.xml and updating the timeout.
>
> After a successful login we create the session, and set the timeout on
> each session that is created using a HTTPSessionListener that is
> attached to the context.
>
> 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. Perhaps can be done if we find the
> Tomcat's internal session object, but prefer not to do it. Am I
> correct or am I missing something?
>
> Sai Pullabhotla
>
>
>
> On Fri, Jul 8, 2011 at 9:31 AM, André Warnier <aw@ice-sa.com> wrote:
> > Sai Pullabhotla wrote:
> >>
> >> We have an application that uploads files using a Servlet deployed in
> >> Tomcat 6. While this works most of the times, occasionally we run into
> >> issues uploading large files. If the upload takes longer then the
> >> session timeout, the session gets invalidated right after the upload.
> >> Tis means no further requests are accepted unless the user logs back
> >> in. Is this the expected behavior? Is there any way to work around
> >> this and keep the session active? I guess one way to fix this is to
> >> have a large session timeout like an hour or two, but we prefer not to
> >> do that for obvious reasons.
> >>
> > Responding in the absolute,
> > if there is a session timeout functionality, then it must be based on
> > a) a timeout value (a number of seconds e.g.)
> > b) somewhere, an indicator of when the session was "last active", which
> gets
> > updated at some point
> >
> > So the problem would boil down to knowing where this "last active" time
> is
> > stored, and update it regularly during the file upload.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v, 121-24)

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