tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darryl Lewis <>
Subject RE: wget and Tomcat resources
Date Thu, 14 Jun 2012 00:51:00 GMT

The -T 0 options limits disables the timeout, so it will hold the connection open until it
gets a response.
Personally, I'd remove it as if the 'ourserver' fails to respond (busy, network issues, solar
flares), that wget job will sit on the calling server forever. The default is 900 seconds,
which is usually good enough. Sometimes you might lower it to say 30 seconds if you are trying
to measure the responsiness of a connection.

Also get you developer to add -t 1
This limits the amount of times it will try to fetch a connection.

Have a look on the box running the script to see if there are a lot of these wget jobs sitting
there. My guess is that there is, and when 'ourserver' finally get around to answering the
requests, it does them all at once.
The one thing you don't mention is how frequently this cron executes. 

wget -t 1

if your cron executes every minute, make the connection only last 20 seconds or fail:

wget -t 1 -T 20

-----Original Message-----
From: Miguel González Castaños [] 
Sent: Thursday, 14 June 2012 9:14 AM
To: Tomcat Users List
Subject: wget and Tomcat resources

Dear all,

   Our developer has set a cronjob similar to this:

   wget -T 0

   which calls a javabean to check pending emails to send in a database 
and actually send them.

   I'm concerned about this, since I have realized that we have peaks of 
500 http connections per minute exactly about the same time this cronjob 
runs. I'm just wondering if this cronjob is performing several retries 
(since it sets a 0 timeout) and count as http hits.

   This increase of http hits (not related to people connecting since 
people connect in office hours and this happens early morning) is 
happening together with an increase of use of memory.



To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message