Error in purgeOldJobs service.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in purgeOldJobs service.

rohit
Hi I upgraded to the latest SVN, and am getting the following error when running the purgeOldJobs service. I tried to look for more details in my log file but could find more than that mentioned below:

Request scheduleService caused an error with the following message: <li>Service dispatcher threw an exceptionService [purgeOldJobs] with wait semaphore exceeded wait timeout, waited [307.608], wait started at 2009-12-30 02:47:04.374


The problem probably is with my database, as the service is working fine on a new build with seed data, but not when old data in imported in the currenct SVN. i am using postgres as the database.

any help will be sincerely appreciated.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Error in purgeOldJobs service.

Scott Gray-2
Hi Rohit,

The purgeOldJobs service can only be run one at a time so the error  
below just indicates that the queued service execution timed out while  
waiting for the existing execution to complete.  I can think of two  
possible causes for this:
1.  Your JobSandbox table has for some reason grown to be  
exceptionally large and the service is struggling to clear the old  
records before the next scheduled service execution.  Assuming the  
service is actually making progress then you should be fine to just  
keep it running.
2.  The ServiceSemaphore table which controls the semaphore flags has  
a stale record for the purgeOldJobs service and is locking the service  
even though it isn't being executed.  I may be wrong but I think the  
ServiceSemaphore table isn't properly cleared when OFBiz is restarted  
meaning that any semaphore locks in place when OFBiz is stopped get  
left behind and prevent those services from running after the  
restart.  Removing any ServiceSemaphore records for services that  
aren't currently running should resolve the problem.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 30/12/2009, at 9:25 PM, rohit wrote:

>
> Hi I upgraded to the latest SVN, and am getting the following error  
> when
> running the purgeOldJobs service. I tried to look for more details  
> in my log
> file but could find more than that mentioned below:
>
> Request scheduleService caused an error with the following message:
> <li>Service dispatcher threw an exceptionService [purgeOldJobs] with  
> wait
> semaphore exceeded wait timeout, waited [307.608], wait started at
> 2009-12-30 02:47:04.374
>
>
> The problem probably is with my database, as the service is working  
> fine on
> a new build with seed data, but not when old data in imported in the
> currenct SVN. i am using postgres as the database.
>
> any help will be sincerely appreciated.
>
> Thanks
> --
> View this message in context: http://n4.nabble.com/Error-in-purgeOldJobs-service-tp990793p990793.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.


smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Error in purgeOldJobs service.

rohit
Hi Scott,

Thanks so much for the help. The ServiceSemaphore table had indeed and old entry which was stopping the purgeoldjobs entry to start. I deleted the entry and then the puroldjobs service started normally.

There is one more query though, the runtime data table is getting bloated, i think there should be some service to clean it which is probably not running. Can you give me some info on it or direct to right resources.

Thanks

Rohit

Scott Gray-2 wrote
Hi Rohit,

The purgeOldJobs service can only be run one at a time so the error  
below just indicates that the queued service execution timed out while  
waiting for the existing execution to complete.  I can think of two  
possible causes for this:
1.  Your JobSandbox table has for some reason grown to be  
exceptionally large and the service is struggling to clear the old  
records before the next scheduled service execution.  Assuming the  
service is actually making progress then you should be fine to just  
keep it running.
2.  The ServiceSemaphore table which controls the semaphore flags has  
a stale record for the purgeOldJobs service and is locking the service  
even though it isn't being executed.  I may be wrong but I think the  
ServiceSemaphore table isn't properly cleared when OFBiz is restarted  
meaning that any semaphore locks in place when OFBiz is stopped get  
left behind and prevent those services from running after the  
restart.  Removing any ServiceSemaphore records for services that  
aren't currently running should resolve the problem.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 30/12/2009, at 9:25 PM, rohit wrote:

>
> Hi I upgraded to the latest SVN, and am getting the following error  
> when
> running the purgeOldJobs service. I tried to look for more details  
> in my log
> file but could find more than that mentioned below:
>
> Request scheduleService caused an error with the following message:
> <li>Service dispatcher threw an exceptionService [purgeOldJobs] with  
> wait
> semaphore exceeded wait timeout, waited [307.608], wait started at
> 2009-12-30 02:47:04.374
>
>
> The problem probably is with my database, as the service is working  
> fine on
> a new build with seed data, but not when old data in imported in the
> currenct SVN. i am using postgres as the database.
>
> any help will be sincerely appreciated.
>
> Thanks
> --
> View this message in context: http://n4.nabble.com/Error-in-purgeOldJobs-service-tp990793p990793.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.


 
Reply | Threaded
Open this post in threaded view
|

Re: Error in purgeOldJobs service.

Scott Gray-2
Hi Rohit

Glad it worked out.  The service you are looking for to clear old jobs  
is exactly the service you were having trouble with: purgeOldJobs.  By  
default it clears out jobs that are at least 4 days old (I think) and  
if necessary this can be changed in the service engine configuration  
file serviceengine.xml.

Regards
Scott

On 3/01/2010, at 9:19 PM, rohit wrote:

>
> Hi Scott,
>
> Thanks so much for the help. The ServiceSemaphore table had indeed  
> and old
> entry which was stopping the purgeoldjobs entry to start. I deleted  
> the
> entry and then the puroldjobs service started normally.
>
> There is one more query though, the runtime data table is getting  
> bloated, i
> think there should be some service to clean it which is probably not
> running. Can you give me some info on it or direct to right resources.
>
> Thanks
>
> Rohit
>
>
> Scott Gray-2 wrote:
>>
>> Hi Rohit,
>>
>> The purgeOldJobs service can only be run one at a time so the error
>> below just indicates that the queued service execution timed out  
>> while
>> waiting for the existing execution to complete.  I can think of two
>> possible causes for this:
>> 1.  Your JobSandbox table has for some reason grown to be
>> exceptionally large and the service is struggling to clear the old
>> records before the next scheduled service execution.  Assuming the
>> service is actually making progress then you should be fine to just
>> keep it running.
>> 2.  The ServiceSemaphore table which controls the semaphore flags has
>> a stale record for the purgeOldJobs service and is locking the  
>> service
>> even though it isn't being executed.  I may be wrong but I think the
>> ServiceSemaphore table isn't properly cleared when OFBiz is restarted
>> meaning that any semaphore locks in place when OFBiz is stopped get
>> left behind and prevent those services from running after the
>> restart.  Removing any ServiceSemaphore records for services that
>> aren't currently running should resolve the problem.
>>
>> Regards
>> Scott
>>
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>> On 30/12/2009, at 9:25 PM, rohit wrote:
>>
>>>
>>> Hi I upgraded to the latest SVN, and am getting the following error
>>> when
>>> running the purgeOldJobs service. I tried to look for more details
>>> in my log
>>> file but could find more than that mentioned below:
>>>
>>> Request scheduleService caused an error with the following message:
>>> <li>Service dispatcher threw an exceptionService [purgeOldJobs] with
>>> wait
>>> semaphore exceeded wait timeout, waited [307.608], wait started at
>>> 2009-12-30 02:47:04.374
>>>
>>>
>>> The problem probably is with my database, as the service is working
>>> fine on
>>> a new build with seed data, but not when old data in imported in the
>>> currenct SVN. i am using postgres as the database.
>>>
>>> any help will be sincerely appreciated.
>>>
>>> Thanks
>>> --
>>> View this message in context:
>>> http://n4.nabble.com/Error-in-purgeOldJobs-service-tp990793p990793.html
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>>
>>
>>
>
> --
> View this message in context: http://n4.nabble.com/Error-in-purgeOldJobs-service-tp990793p997628.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.


smime.p7s (4K) Download Attachment