Thanks for all the suggestions.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Serge Knystautas
Sent: Thursday, February 08, 2007 10:42 AM
To: General Discussion for the Resin application server
Subject: Re: [Resin-interest] Send 503 when servlet init is very long

Another option is to not have Resin bind during the initialization process.  
This is more commonly used when you have a load balancer and other available 
servers, but might be of use to you.

http://www.caucho.com/resin-3.0/features/resin-3.0.10.xtp#bind-ports-after-start
 


--
Serge Knystautas
Lokitech >> software . strategy . design >> http://www.lokitech.com p. 
301.656.5501 e. [EMAIL PROTECTED]

Bill Au wrote:
> You should be able to cause those requests to fail by setting 
> read-timeout and write-timeout in <http>.  But it probably won't be a 
> 503.
> 
> Be careful if you do decide to start a background thread from your servlet.
> There was a recent thread on the mailing list about that.
> 
> Bill
> 
> On 2/8/07, *Daniel López* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > 
> wrote:
> 
>     Hi,
> 
>     Not sure if that would work for you or not, but another option would be
>     to move that initial process to a background thread and then your app
>     can check itself if the init has finished or not, and answer with a
>     nicer message "initalisation in progress, please wait..." etc, rather
>     than holding the container initialisation for that long.
> 
>     The problem I see with halting resin init-process is that if you add
>     other servlets or other applications in the same container, they might
>     have to wait for that long, even if they could be answering requests
>     already. Moreover, doing it on your own would also make your web app
>     container-agnostic, you would not depend on the container holding other
>     servlets or not, returning 503s or not...
> 
>     Just an idea,
>     D.
> 
>     Bryan Engel escribió:
>      > Hi,
>      >
>      > I have a servlet running on Resin 3.0.14 that takes a very long
>     in init
>      > (up to 15 minutes).  As soon as init has finished, all the
>     requests that
>      > came in during that time are processed, even it they are minutes
>     old.
>      >
>      > I tried using the following in my resin.conf file but this didn't do
>      > anything:
>      >  <web-app-default>
>      >       <active-wait-time>5s</active-wait-time>
>      >       ...
>      >
>      > Is there a way to make resin turn away these requests with 503s or
>      > similar until init is finished?
>      >
>      > Thanks in advance.
> 
> 
>     _______________________________________________
>     resin-interest mailing list
>     resin-interest@caucho.com <mailto:resin-interest@caucho.com>
>     http://maillist.caucho.com/mailman/listinfo/resin-interest
>     <http://maillist.caucho.com/mailman/listinfo/resin-interest>
> 
> 
> 
> ----------------------------------------------------------------------
> --
> 
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to