You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ivano Luberti <lu...@archicoop.it.INVALID> on 2023/08/18 14:18:02 UTC
tomcat timeouts on startup and on context deployment
Hello eveybody, in one of my use case, when upgrading a web application
it coult happen that on startup the application has to perform some
database operation that could require some time, even some minutes.
This happens typically when deploying the application via tomcat manager
but could possibly happen when starting tomcat if the war file has been
replaced while tomcat was down.
Where can I configure these timeouts?
In eclipse I have found the timeout for the tomcat server but via the
eclipse interface.
I have searched tomcat documentation but to no avail..
I'm using tomcat 8.5 and tomcat 9
TIA
--
Archimede Informatica tratta i dati personali in conformità a quanto
stabilito dal Regolamento UE n. 2016/679 (GDPR) e dal D. Lgs. 30 giugno
2003 n. 196
per come modificato dal D.Lgs. 10 agosto 2018 n. 101.
Informativa completa
<http://www.archicoop.it/fileadmin/pdf/InformativaTrattamentoDatiPersonali.pdf>
dott. Ivano Mario Luberti
Archimede Informatica società cooperativa a r. l.
Via Gereschi 36, 56127 Pisa
tel.: +39 050/580959 | fax: +39 050/8932061
web: www.archicoop.it
linkedin: www.linkedin.com/in/ivanoluberti
facebook: www.facebook.com/archimedeinformaticapisa/
Re: tomcat timeouts on startup and on context deployment
Posted by Maxim Solodovnik <so...@gmail.com>.
On Sat, 19 Aug 2023 at 14:58, Ivano Luberti
<lu...@archicoop.it.invalid> wrote:
>
> Christopher, Maxim
>
> To clarify , I have never hit a timeout in production , but it happened
> in Eclipse and since this timeout is configurable in Eclipse Tomcat
> Launch configuration I have guessed such a timeout is a tomcat property
> hidden somewhere.
>
> AFAIK the list server doesn't allow attachment so I put here a dropbox
> link of a picture of the Eclipse interface I'm talking about.
>
> I hope this make me able to let you understand what I mean
>
> https://www.dropbox.com/scl/fi/vg4ygu8pggkz3tpa1a0wo/EclipseTomcatTimeotConfig.PNG?rlkey=ztt0n6axy2hohi47ix3zjvzif&dl=0
I only can guess
But I believe these are internal Eclipse timeouts to ensure Tomcat
process is alive
i.e. how long to wait before grep the logs for `Server startup in
[8002] milliseconds` message :)
Additionally you can try to check plugin sources :)
>
> Il 19/08/2023 06:27, Maxim Solodovnik ha scritto:
> > from mobile (sorry for typos ;)
> >
> >
> > On Sat, Aug 19, 2023, 10:49 Christopher Schultz <
> > chris@christopherschultz.net> wrote:
> >
> >> Ivano,
> >>
> >> On 8/18/23 18:17, Ivano Luberti wrote:
> >>> It seems I had explained myself badly. I'll try again.
> >>>
> >>> I need to know if there is and it is configurable a timeout on tomcat
> >>> startup (in Eclipse you can configure it in the server configuration
> >>> interface)
> >>>
> >>> I need also to know if there is and it is configurable a timeout on
> >>> application deployment when you use tomcat manager to deploy a war file
> >>> or application start, fom tomcat manager interface as well
> >> Tomcat doesn't wait for anything on startup except for the web
> >> applications to deploy. If your application takes long to start, Tomcat
> >> will take long to start. But Tomcat won't say "it's been 60 seconds,
> >> sorry, I'm killing the application" or anything like that.
> >>
> >> If you use the Manager web application to deploy an application, it's
> >> possible that the tool you use for deployment (e.g. curl, or whatever
> >> makes the call to Tomcat's manager-deploy action) will have an HTTP
> >> timeout. Tomcat will complete the deployment work, but the
> >> deploying-client might not get a successful HTTP response within that
> >> time period.
> >>
> >> But that's a timeout on the client end, not on Tomcat's end.
> >>
> >> I'm just guessing at what timeout you are talking about, here. I may be
> >> totally off.
> >>
> >> You said that Eclipse had a configurable timeout. What is that for /
> >> what is it called / what does it do?
> >>
> > Initializing of SecureRandom might cause long tomcat start
> > You can switch to /dev/urandom (less secure)
> >
> >
> >
> >> -chris
> >>
> >>> Il 18/08/2023 22:57, Christopher Schultz ha scritto:
> >>>> Ivano,
> >>>>
> >>>> On 8/18/23 10:18, Ivano Luberti wrote:
> >>>>> Hello eveybody, in one of my use case, when upgrading a web
> >>>>> application it coult happen that on startup the application has to
> >>>>> perform some database operation that could require some time, even
> >>>>> some minutes.
> >>>>>
> >>>>> This happens typically when deploying the application via tomcat
> >>>>> manager but could possibly happen when starting tomcat if the war
> >>>>> file has been replaced while tomcat was down.
> >>>>>
> >>>>> Where can I configure these timeouts?
> >>>> What timeouts, specifically?
> >>>>
> >>>> -chris
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> 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
> >>
> >>
> --
>
> Archimede Informatica tratta i dati personali in conformità a quanto
> stabilito dal Regolamento UE n. 2016/679 (GDPR) e dal D. Lgs. 30 giugno
> 2003 n. 196
> per come modificato dal D.Lgs. 10 agosto 2018 n. 101.
> Informativa completa
> <http://www.archicoop.it/fileadmin/pdf/InformativaTrattamentoDatiPersonali.pdf>
>
> dott. Ivano Mario Luberti
>
> Archimede Informatica società cooperativa a r. l.
> Via Gereschi 36, 56127 Pisa
>
> tel.: +39 050/580959 | fax: +39 050/8932061
>
> web: www.archicoop.it
> linkedin: www.linkedin.com/in/ivanoluberti
> facebook: www.facebook.com/archimedeinformaticapisa/
--
Best regards,
Maxim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Ответить: tomcat timeouts on startup and on context deployment
Posted by Усманов Азат Анварович <us...@ieml.ru>.
Hello everyone! I use tomcat at $work, both on windows with Eclipse and on Linux without Eclipse. I believe that those timeouts the OP is talking about,are used for tomcat itself, not individual apps inside Tomcat. When such timeouts are reached Eclipse typically just ends tomcat java process, releases all the resources , such as ports,files etc. It is a useful thing to have for cases when tomcat is accessing the remote db. So when db is down for some reason, you don't want to wait forever to figure something is wrong. Notice that on timeout eclipse just says unable to start tomcat in n number of seconds , please increase timeout., and outputs nothing about the termination in console window in eclipse, at least by default. I suspect its because these are purely eclipse timeouts. I usually keep them around 5 minutes for startup just in case., although tomcat usually starts in no more than 50 seconds.
________________________________
От: Ivano Luberti <lu...@archicoop.it.INVALID>
Отправлено: 19 августа 2023 г. 10:57
Кому: users@tomcat.apache.org <us...@tomcat.apache.org>
Тема: Re: tomcat timeouts on startup and on context deployment
Christopher, Maxim
To clarify , I have never hit a timeout in production , but it happened
in Eclipse and since this timeout is configurable in Eclipse Tomcat
Launch configuration I have guessed such a timeout is a tomcat property
hidden somewhere.
AFAIK the list server doesn't allow attachment so I put here a dropbox
link of a picture of the Eclipse interface I'm talking about.
I hope this make me able to let you understand what I mean
https://www.dropbox.com/scl/fi/vg4ygu8pggkz3tpa1a0wo/EclipseTomcatTimeotConfig.PNG?rlkey=ztt0n6axy2hohi47ix3zjvzif&dl=0
Il 19/08/2023 06:27, Maxim Solodovnik ha scritto:
> from mobile (sorry for typos ;)
>
>
> On Sat, Aug 19, 2023, 10:49 Christopher Schultz <
> chris@christopherschultz.net> wrote:
>
>> Ivano,
>>
>> On 8/18/23 18:17, Ivano Luberti wrote:
>>> It seems I had explained myself badly. I'll try again.
>>>
>>> I need to know if there is and it is configurable a timeout on tomcat
>>> startup (in Eclipse you can configure it in the server configuration
>>> interface)
>>>
>>> I need also to know if there is and it is configurable a timeout on
>>> application deployment when you use tomcat manager to deploy a war file
>>> or application start, fom tomcat manager interface as well
>> Tomcat doesn't wait for anything on startup except for the web
>> applications to deploy. If your application takes long to start, Tomcat
>> will take long to start. But Tomcat won't say "it's been 60 seconds,
>> sorry, I'm killing the application" or anything like that.
>>
>> If you use the Manager web application to deploy an application, it's
>> possible that the tool you use for deployment (e.g. curl, or whatever
>> makes the call to Tomcat's manager-deploy action) will have an HTTP
>> timeout. Tomcat will complete the deployment work, but the
>> deploying-client might not get a successful HTTP response within that
>> time period.
>>
>> But that's a timeout on the client end, not on Tomcat's end.
>>
>> I'm just guessing at what timeout you are talking about, here. I may be
>> totally off.
>>
>> You said that Eclipse had a configurable timeout. What is that for /
>> what is it called / what does it do?
>>
> Initializing of SecureRandom might cause long tomcat start
> You can switch to /dev/urandom (less secure)
>
>
>
>> -chris
>>
>>> Il 18/08/2023 22:57, Christopher Schultz ha scritto:
>>>> Ivano,
>>>>
>>>> On 8/18/23 10:18, Ivano Luberti wrote:
>>>>> Hello eveybody, in one of my use case, when upgrading a web
>>>>> application it coult happen that on startup the application has to
>>>>> perform some database operation that could require some time, even
>>>>> some minutes.
>>>>>
>>>>> This happens typically when deploying the application via tomcat
>>>>> manager but could possibly happen when starting tomcat if the war
>>>>> file has been replaced while tomcat was down.
>>>>>
>>>>> Where can I configure these timeouts?
>>>> What timeouts, specifically?
>>>>
>>>> -chris
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
--
Archimede Informatica tratta i dati personali in conformità a quanto
stabilito dal Regolamento UE n. 2016/679 (GDPR) e dal D. Lgs. 30 giugno
2003 n. 196
per come modificato dal D.Lgs. 10 agosto 2018 n. 101.
Informativa completa
<http://www.archicoop.it/fileadmin/pdf/InformativaTrattamentoDatiPersonali.pdf>
dott. Ivano Mario Luberti
Archimede Informatica società cooperativa a r. l.
Via Gereschi 36, 56127 Pisa
tel.: +39 050/580959 | fax: +39 050/8932061
web: www.archicoop.it<http://www.archicoop.it>
linkedin: www.linkedin.com/in/ivanoluberti<http://www.linkedin.com/in/ivanoluberti>
facebook: www.facebook.com/archimedeinformaticapisa/<http://www.facebook.com/archimedeinformaticapisa/>
Re: tomcat timeouts on startup and on context deployment
Posted by Ivano Luberti <lu...@archicoop.it.INVALID>.
Christopher, Maxim
To clarify , I have never hit a timeout in production , but it happened
in Eclipse and since this timeout is configurable in Eclipse Tomcat
Launch configuration I have guessed such a timeout is a tomcat property
hidden somewhere.
AFAIK the list server doesn't allow attachment so I put here a dropbox
link of a picture of the Eclipse interface I'm talking about.
I hope this make me able to let you understand what I mean
https://www.dropbox.com/scl/fi/vg4ygu8pggkz3tpa1a0wo/EclipseTomcatTimeotConfig.PNG?rlkey=ztt0n6axy2hohi47ix3zjvzif&dl=0
Il 19/08/2023 06:27, Maxim Solodovnik ha scritto:
> from mobile (sorry for typos ;)
>
>
> On Sat, Aug 19, 2023, 10:49 Christopher Schultz <
> chris@christopherschultz.net> wrote:
>
>> Ivano,
>>
>> On 8/18/23 18:17, Ivano Luberti wrote:
>>> It seems I had explained myself badly. I'll try again.
>>>
>>> I need to know if there is and it is configurable a timeout on tomcat
>>> startup (in Eclipse you can configure it in the server configuration
>>> interface)
>>>
>>> I need also to know if there is and it is configurable a timeout on
>>> application deployment when you use tomcat manager to deploy a war file
>>> or application start, fom tomcat manager interface as well
>> Tomcat doesn't wait for anything on startup except for the web
>> applications to deploy. If your application takes long to start, Tomcat
>> will take long to start. But Tomcat won't say "it's been 60 seconds,
>> sorry, I'm killing the application" or anything like that.
>>
>> If you use the Manager web application to deploy an application, it's
>> possible that the tool you use for deployment (e.g. curl, or whatever
>> makes the call to Tomcat's manager-deploy action) will have an HTTP
>> timeout. Tomcat will complete the deployment work, but the
>> deploying-client might not get a successful HTTP response within that
>> time period.
>>
>> But that's a timeout on the client end, not on Tomcat's end.
>>
>> I'm just guessing at what timeout you are talking about, here. I may be
>> totally off.
>>
>> You said that Eclipse had a configurable timeout. What is that for /
>> what is it called / what does it do?
>>
> Initializing of SecureRandom might cause long tomcat start
> You can switch to /dev/urandom (less secure)
>
>
>
>> -chris
>>
>>> Il 18/08/2023 22:57, Christopher Schultz ha scritto:
>>>> Ivano,
>>>>
>>>> On 8/18/23 10:18, Ivano Luberti wrote:
>>>>> Hello eveybody, in one of my use case, when upgrading a web
>>>>> application it coult happen that on startup the application has to
>>>>> perform some database operation that could require some time, even
>>>>> some minutes.
>>>>>
>>>>> This happens typically when deploying the application via tomcat
>>>>> manager but could possibly happen when starting tomcat if the war
>>>>> file has been replaced while tomcat was down.
>>>>>
>>>>> Where can I configure these timeouts?
>>>> What timeouts, specifically?
>>>>
>>>> -chris
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
--
Archimede Informatica tratta i dati personali in conformità a quanto
stabilito dal Regolamento UE n. 2016/679 (GDPR) e dal D. Lgs. 30 giugno
2003 n. 196
per come modificato dal D.Lgs. 10 agosto 2018 n. 101.
Informativa completa
<http://www.archicoop.it/fileadmin/pdf/InformativaTrattamentoDatiPersonali.pdf>
dott. Ivano Mario Luberti
Archimede Informatica società cooperativa a r. l.
Via Gereschi 36, 56127 Pisa
tel.: +39 050/580959 | fax: +39 050/8932061
web: www.archicoop.it
linkedin: www.linkedin.com/in/ivanoluberti
facebook: www.facebook.com/archimedeinformaticapisa/
Re: tomcat timeouts on startup and on context deployment
Posted by Maxim Solodovnik <so...@gmail.com>.
from mobile (sorry for typos ;)
On Sat, Aug 19, 2023, 10:49 Christopher Schultz <
chris@christopherschultz.net> wrote:
> Ivano,
>
> On 8/18/23 18:17, Ivano Luberti wrote:
> > It seems I had explained myself badly. I'll try again.
> >
> > I need to know if there is and it is configurable a timeout on tomcat
> > startup (in Eclipse you can configure it in the server configuration
> > interface)
> >
> > I need also to know if there is and it is configurable a timeout on
> > application deployment when you use tomcat manager to deploy a war file
> > or application start, fom tomcat manager interface as well
>
> Tomcat doesn't wait for anything on startup except for the web
> applications to deploy. If your application takes long to start, Tomcat
> will take long to start. But Tomcat won't say "it's been 60 seconds,
> sorry, I'm killing the application" or anything like that.
>
> If you use the Manager web application to deploy an application, it's
> possible that the tool you use for deployment (e.g. curl, or whatever
> makes the call to Tomcat's manager-deploy action) will have an HTTP
> timeout. Tomcat will complete the deployment work, but the
> deploying-client might not get a successful HTTP response within that
> time period.
>
> But that's a timeout on the client end, not on Tomcat's end.
>
> I'm just guessing at what timeout you are talking about, here. I may be
> totally off.
>
> You said that Eclipse had a configurable timeout. What is that for /
> what is it called / what does it do?
>
Initializing of SecureRandom might cause long tomcat start
You can switch to /dev/urandom (less secure)
> -chris
>
> > Il 18/08/2023 22:57, Christopher Schultz ha scritto:
> >> Ivano,
> >>
> >> On 8/18/23 10:18, Ivano Luberti wrote:
> >>> Hello eveybody, in one of my use case, when upgrading a web
> >>> application it coult happen that on startup the application has to
> >>> perform some database operation that could require some time, even
> >>> some minutes.
> >>>
> >>> This happens typically when deploying the application via tomcat
> >>> manager but could possibly happen when starting tomcat if the war
> >>> file has been replaced while tomcat was down.
> >>>
> >>> Where can I configure these timeouts?
> >>
> >> What timeouts, specifically?
> >>
> >> -chris
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>
Re: tomcat timeouts on startup and on context deployment
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Ivano,
On 8/18/23 18:17, Ivano Luberti wrote:
> It seems I had explained myself badly. I'll try again.
>
> I need to know if there is and it is configurable a timeout on tomcat
> startup (in Eclipse you can configure it in the server configuration
> interface)
>
> I need also to know if there is and it is configurable a timeout on
> application deployment when you use tomcat manager to deploy a war file
> or application start, fom tomcat manager interface as well
Tomcat doesn't wait for anything on startup except for the web
applications to deploy. If your application takes long to start, Tomcat
will take long to start. But Tomcat won't say "it's been 60 seconds,
sorry, I'm killing the application" or anything like that.
If you use the Manager web application to deploy an application, it's
possible that the tool you use for deployment (e.g. curl, or whatever
makes the call to Tomcat's manager-deploy action) will have an HTTP
timeout. Tomcat will complete the deployment work, but the
deploying-client might not get a successful HTTP response within that
time period.
But that's a timeout on the client end, not on Tomcat's end.
I'm just guessing at what timeout you are talking about, here. I may be
totally off.
You said that Eclipse had a configurable timeout. What is that for /
what is it called / what does it do?
-chris
> Il 18/08/2023 22:57, Christopher Schultz ha scritto:
>> Ivano,
>>
>> On 8/18/23 10:18, Ivano Luberti wrote:
>>> Hello eveybody, in one of my use case, when upgrading a web
>>> application it coult happen that on startup the application has to
>>> perform some database operation that could require some time, even
>>> some minutes.
>>>
>>> This happens typically when deploying the application via tomcat
>>> manager but could possibly happen when starting tomcat if the war
>>> file has been replaced while tomcat was down.
>>>
>>> Where can I configure these timeouts?
>>
>> What timeouts, specifically?
>>
>> -chris
>>
>> ---------------------------------------------------------------------
>> 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
Re: tomcat timeouts on startup and on context deployment
Posted by Ivano Luberti <lu...@archicoop.it.INVALID>.
Hi Christopher.
It seems I had explained myself badly. I'll try again.
I need to know if there is and it is configurable a timeout on tomcat
startup (in Eclipse you can configure it in the server configuration
interface)
I need also to know if there is and it is configurable a timeout on
application deployment when you use tomcat manager to deploy a war file
or application start, fom tomcat manager interface as well
Il 18/08/2023 22:57, Christopher Schultz ha scritto:
> Ivano,
>
> On 8/18/23 10:18, Ivano Luberti wrote:
>> Hello eveybody, in one of my use case, when upgrading a web
>> application it coult happen that on startup the application has to
>> perform some database operation that could require some time, even
>> some minutes.
>>
>> This happens typically when deploying the application via tomcat
>> manager but could possibly happen when starting tomcat if the war
>> file has been replaced while tomcat was down.
>>
>> Where can I configure these timeouts?
>
> What timeouts, specifically?
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
--
Archimede Informatica tratta i dati personali in conformità a quanto
stabilito dal Regolamento UE n. 2016/679 (GDPR) e dal D. Lgs. 30 giugno
2003 n. 196
per come modificato dal D.Lgs. 10 agosto 2018 n. 101.
Informativa completa
<http://www.archicoop.it/fileadmin/pdf/InformativaTrattamentoDatiPersonali.pdf>
dott. Ivano Mario Luberti
Archimede Informatica società cooperativa a r. l.
Via Gereschi 36, 56127 Pisa
tel.: +39 050/580959 | fax: +39 050/8932061
web: www.archicoop.it
linkedin: www.linkedin.com/in/ivanoluberti
facebook: www.facebook.com/archimedeinformaticapisa/
Re: tomcat timeouts on startup and on context deployment
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Ivano,
On 8/18/23 10:18, Ivano Luberti wrote:
> Hello eveybody, in one of my use case, when upgrading a web application
> it coult happen that on startup the application has to perform some
> database operation that could require some time, even some minutes.
>
> This happens typically when deploying the application via tomcat manager
> but could possibly happen when starting tomcat if the war file has been
> replaced while tomcat was down.
>
> Where can I configure these timeouts?
What timeouts, specifically?
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org