|
From: Leif M. <lei...@ta...> - 2014-06-05 09:01:10
|
Tue, The restart delay itself can't be changed in that way because it sounds like you are actually not sure how long it will take. Maybe a better solution is to put the Wrapper into a Paused state: http://wrapper.tanukisoftware.com/doc/english/prop-pausable.html There is then a number of ways to resume the Wrapper and thus start your application. * Command File and the RESUME command: http://wrapper.tanukisoftware.com/doc/english/prop-commandfile.html * Resume the service using service manager or command line * Using a timer and RESUME action: http://wrapper.tanukisoftware.com/doc/english/prop-timer-n.html#action If you use the Pause / Resume method, you will have to make sure that the Wrapper is reliably resumed in all cases. If you use a timer to resume every minute for example, you could have your Java code immediately repause it and stop the JVM if some condition is not met. You could also use the timer to run every 15 mintues or something in the same way as a last resort in case the normal resume fails to be fired. Normally you could run your external job and then use "net resume myapp" at the end to resume the Wrapper. Please let me know how this works for you. Cheers, Leif On Thu, Jun 5, 2014 at 5:11 PM, Tue S. Dissing <TS...@cd...> wrote: > Hi, > > > > We’re running with a lot of simultaneous jobs each processing its own > thing. > > Each run with its own wrapper configuration. > > > > We have no control over how busy these processes are, but we would like to > get tasks processed as soon as they tick in – i.e. we have no can control > over the amount of work coming in. > > > > So I’m looking for a way to dynamically defining the restart delay. > > > > > > Let’s say our jobs run every 60 seconds, then I would like to increase the > delay to say 5 minutes for individual jobs if their processing time is > below a certain threshold; i.e. if it only run for 5 sec. > > > > The reason for this is that we’re seeing a heavy load on the CPU when all > these jobs starts and stops all the time (and fires up the JVM which then, > in vain, looks for new records to process)– we do not process much data but > the CPU load is close to 90% at all time. > > > > Any other suggestion that might help us with this problem is more than > welcome. > > > > Best regards > > > > *Tue S. Dissing* > > Technical Lead > > > > |