Re: wget and Tomcat resources
- Mensaje original - De: Darryl Lewis darryl.le...@unsw.edu.au Para: Tomcat Users List users@tomcat.apache.org CC: Enviado: Jueves 14 de junio de 2012 2:51 Asunto: RE: wget and Tomcat resources 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. Sorry, it runs every hour. I have google around, how can I get a list of processes that are launched by cron? I can't find them Regards, Miguel - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: wget and Tomcat resources
Depending on what OS you are using, if you use either ps -ef or ps -aux it will show you the processes, and you should see a few wget jobs sitting there. Being that it runs only once an hour, I doubt that a few hundred wget jobs are building up. Try moving the cron job to a little bit past the hour, say 14 minutes past, and see if the peak load also moves with the new starting time of the job. That would indicate that it is the wget job and then we can dig further. -Original Message- From: Miguel Gonzalez [mailto:miguel_3_gonza...@yahoo.es] Sent: Thursday, 14 June 2012 5:06 PM To: Tomcat Users List Subject: Re: wget and Tomcat resources - Mensaje original - De: Darryl Lewis darryl.le...@unsw.edu.au Para: Tomcat Users List users@tomcat.apache.org CC: Enviado: Jueves 14 de junio de 2012 2:51 Asunto: RE: wget and Tomcat resources 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. Sorry, it runs every hour. I have google around, how can I get a list of processes that are launched by cron? I can't find them Regards, Miguel - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: wget and Tomcat resources
- Mensaje original - De: Darryl Lewis darryl.le...@unsw.edu.au Para: Tomcat Users List users@tomcat.apache.org; Miguel Gonzalez miguel_3_gonza...@yahoo.es CC: Enviado: Jueves 14 de junio de 2012 9:40 Asunto: RE: wget and Tomcat resources Depending on what OS you are using, if you use either ps -ef or ps -aux Nope, with those commands it doesn't show any wget job - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: wget and Tomcat resources
2012/6/14 Miguel González Castaños miguel_3_gonza...@yahoo.es: Dear all, Our developer has set a cronjob similar to this: wget -T 0 http://ourserver.com/email_sender 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. 1. Configure your AccessLogValve to print User-Agent header of the request (%{User-Agent}i ). This way you will know what requests come from wget and how fast they are served by Tomcat. 2. Make sure that the page contacted by wget does not use sessions. If each request creates a new session it would be a waste of resources. You can include session id into AccessLogValve configuration: %S Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: wget and Tomcat resources
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. Try: wget -t 1 http://ourserver.com/email_sender if your cron executes every minute, make the connection only last 20 seconds or fail: wget -t 1 -T 20 http://ourserver.com/email_sender -Original Message- From: Miguel González Castaños [mailto:miguel_3_gonza...@yahoo.es] 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 http://ourserver.com/email_sender 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. Regards, Miguel - 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