-
1. Re: jboss shedule not perform in time
while_true Nov 26, 2011 12:13 PM (in response to bobzer)1 of 1 people found this helpfulHey Vladimir,
Try to use this:
<attribute name="FixedRate">true</attribute>
What it will do is, basically, take into consideration only the time you told JBoss the scheduler to start (SchedulePeriod). If you put this attribute to false, FixedDelay will be taken into account and then, not only the time you've sated the scheduler to start will be used but also it will have added the time that the scheduler took to process (SchedulePeriod=SchedulePeriod + AmountOfTimeOfLastProcessing).
For more detail you can check this: http://community.jboss.org/message/168351
Grateful for your attention.
Best regards.
-
2. Re: jboss shedule not perform in time
bobzer Dec 6, 2011 4:56 AM (in response to while_true)Sorry for long time to wait for my answer, but i'l need time to test, because at the beginning the result was not clear.
First of all, I discovered that failure occurs at high load of our JBoss server. When the load decreases, the service starts right on schedule.
The first day after the addition of
FixedRate
parameter, I thought that the problem is solved. But the next day failures reappeared on high server load. Initially, shift reached few minutes, but one day service starts late by 3 hours.Finally, after week of testing, I came to the conclusion:
- Problem arises when a high load on the server
- The adding
FixedRate
param not solve the problem
Also add that the main burden falls on the server when processing hundreds of thousands of requests per day, passed through Web services. These requests are handled promptly at any time, which suggests that the overall workload of the server is not overloaded.
Also add that the time of service running (complete perform method) is maximum few (less than 2) minutes at any load.
Any suggestions?
-
3. Re: jboss shedule not perform in time
while_true Dec 6, 2011 6:27 AM (in response to bobzer)Vladimir,
These are my suggestions:
- If you can, try to get another server and a load balancer because, as you said, that's a overload of the server and not a JBoss error;
- Other suggestion is, instead of you processing your hundreds of thousands of request all in once, try to create several instances of your scheduler, that are triggered every "X" time, and that process your requests separately.
- Last but not least, you can also use JBoss ESB schedulers (http://docs.redhat.com/docs/en-US/JBoss_Enterprise_SOA_Platform/4.3/html/Programmers_Guide/sect-SOA_ESB_Programmers_Guide-Advanced_Topics-Scheduling_of_Services.html)
Hope that I gave you some enlightenment over your doubts. Any question just ask.
Grateful for your attention.
Best regards.
-
4. Re: jboss shedule not perform in time
bobzer Dec 21, 2011 7:20 AM (in response to while_true)First of all, the sheduled task is small and absolutely independed from main payload processes. The only shared resource, that i see on the my application level, is database source. But I doubt that the <depends>jboss.har:service=HibernateNAT</depends> is checked before call perform method, though perhaps I'm wrong.
Anyway, i decide to change shedule engine for this task, and applied standart Java sheduler - Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate( this, timeout, timeout, TimeUnit.MILLISECONDS);
I load Java sheduler from JBoss ServiceMBean. In my opinion, this is not the right approach, but now task sheduled right in time at any server load.
I still do not know why the org.jboss.varia.scheduler.Scheduler is not properly working for me...
-
5. Re: jboss shedule not perform in time
bobzer Aug 9, 2012 11:25 PM (in response to bobzer)1 of 1 people found this helpfulHave same problems on JBoss 4.2.3 in the same environment (IBM Java, AIX OS). Using hardcoded standart Java sheduler on enterprise server is bad practice. I decide to move on Quartz engine, and seems it work perfect.