cancel batch tasks

OK, about 3 weeks ago I removed about 15K editions on 2 different branches, on a TS 7.1 server on Solaris. iwstat tells me that it is still running (about 3/4 editions at a time).

Any way to click cancel ? I tried iwabort but that cancels the current edition and it just seems to go to the next.

Andy

Comments

  • Andy,
    How did you solve this issue where Batch jobs are queued for cleaning up deleted edition ??
  • Patience. It took a fairly long time.
  • Thanks Andy...
    WIll this stop other tasks like editing an dcr ?
    What I'm seeing is other tasks are waiting..

    I deleted around 200 Editions, can you make a guess on how much time its gonna take ?
  • I deleted around 200 Editions, can you make a guess on how much time its gonna take ?
    There are way too many variables, for which you have not provided even the minimal amount of information to come up with an accurate assessment of how long it will take to clear out 200 editions in your environment.

    Suffice it to say - it could take anywhere from 10-hours to 10-days or possibly even longer.

    I once had to sit there and run iwabort commands to try to reduce the load of a bunch of editions being deleted - it was definitely a hack solution and I don't recall if we had to go through and run iwfsck/iwfsfix after wards.

    If you want an officially supported method for dealing with an already on-going process of trying to delete N editions in your environment - you should contact HP Autonomy Support and let them tell you what to do / what to expect.

    Who knows - the process may finish before they get back to you with an answer ;-)
  • Thank you for the hint.

    iwstat deisplays the below output:
    Even I issued iwabort on 0x6 batch jobs process, it states (aborting) but not able to open a dcr for edits in the entire store. Is this an expected bahavior where batchjobs blocking other tasks like editing a dcr ?
    ---------------------------------
    ID Thread User Duration Store Operation
    0x20be 0xa19ffb90 jsankara 0.000 - GetServerStatus
    0x12d8 0xa79e5b90 user1 24141.427 default CompareFSE 0x000021000000000000fa8300
    0x6 0xb23f6b90 - 67124.296 default BatchJobs

    Store: default
    Batch Jobs (running):
    Queued User Job Object ID
    [Fri Aug 30 10:10:02 2013] jsankara Cleanup destroyed edition 2013-03-12_10-03-18_35815 (area #3335) 0x00002010000000000149abff
    [Fri Aug 30 10:10:03 2013] jsankara Cleanup destroyed edition 2013-03-08_04-00-29_35759 (area #3285) 0x000020100000000001495079
    [Fri Aug 30 10:10:05 2013] jsankara Cleanup destroyed edition 2013-01-17_16-49-15_34659 (area #2913) 0x0000201000000000013ef271
    [Fri Aug 30 10:10:05 2013] jsankara Cleanup destroyed edition 2013-01-08_15-41-21_34412 (area #2821) 0x0000201000000000013d1f30
    [Fri Aug 30 10:10:06 2013] jsankara Cleanup destroyed edition ED_2013.16 (area #6405) 0x00002010000000000161f6f8
    [Fri Aug 30 10:10:07 2013] jsankara Cleanup destroyed edition 2013-08-08_05-01-24_39175 (area #6380) 0x00002010000000000161ebd7
    [Fri Aug 30 10:10:07 2013] jsankara Cleanup destroyed edition 2012-10-02_15-15-14_32363 (area #2237) 0x0000201000000000012f7976
    [Fri Aug 30 10:10:07 2013] jsankara Cleanup destroyed edition 2012-10-02_04-00-52_32345 (area #2220) 0x0000201000000000012f4ade
    [Fri Aug 30 10:10:08 2013] jsankara Cleanup destroyed edition 2013-08-07_12-01-07_39166 (area #6315) 0x00002010000000000161ce90
    [Fri Aug 30 10:10:08 2013] jsankara Cleanup destroyed edition 2013-08-07_10-52-43_39159 (area #6277) 0x00002010000000000161b9ec
    .....
  • Is this an expected bahavior where batchjobs blocking other tasks like editing a dcr ?
    Depends on your definition of "expected behaviour".. The cleanup is a fairly expensive process and the iwserver tends to suck every cycle of its processor core for it. So while your UI (JBoss) may continue to work fine if your server has multiple processor cores, any calls to the content store must go through iwserver and will thus be extremely slow -- so slow that your browser may time out before the response comes back.

    Expected you ask? Well, perhaps the cleanup should have been implemented as more of a low-priority task in iwserver, but perhaps you shouldn't be performing maintenance tasks on a production server at 2pm on a Wednesday. Smiley Happy I exaggerate of course, but as ghoti says, there are too many variables in play here. Ideally, you'd be running this on a production mirror server first, so you can time it and plan the real deal accordingly.
  • The "clean" way to do this is to write a script (or Java program?) that essentially:
      Assuming you write the script to have a start and/or end edition name parameter, you should be able to interrupt the process (the loop, not the deletion of an edition already being processed) and then be able to pick it up again later - i.e.: you could run the process over several evenings and interrupt it during the work-day.
  • The "clean" way to do this is to write a script (or Java program?) that essentially [...]
    Hmm.. good call. Extending this idea, I suppose if your editions are created on a regular basis, you could have a scheduled task / cron job that runs on weekends and executes a script similar to this, to automatically remove editions more than X days old (where X is perhaps something like 1000), basically capping your version history at a certain age and iteratively auto-cleaning itself up rather than trying to do it in bulk.
  • Hmm.. good call. Extending this idea, I suppose if your editions are created on a regular basis, you could have a scheduled task / cron job that runs on weekends and executes a script similar to this, to automatically remove editions more than X days old (where X is perhaps something like 1000), basically capping your version history at a certain age and iteratively auto-cleaning itself up rather than trying to do it in bulk.
    Yeah - that's actually something I think Smitty did back in his Nike days - or at least I think he did something like that (perhaps it was Wally, or perhaps it was someone else altogether?)
  • similar to what I described here - once upon a time Smiley Happy
    http://devnet.interwoven.com/forums_vb/showthread.php?t=31992&page=2&pp=10
    Perhaps it was your post I was thinking of - though I still, for some reason, have Smitty in mind - and I think it was before 2010 - but hey, when one gets old ... :-)
  • Thanks Andy...
    WIll this stop other tasks like editing an dcr ?
    What I'm seeing is other tasks are waiting..

    I deleted around 200 Editions, can you make a guess on how much time its gonna take ?
    This doesn't address your question but you can pause your batch processes by using iwfreeze. In the past I've used a scheduled task to freeze the batch processes during prime business hours. Something like below:

    Scheduled Task 7:00am
    iwfreeze -j +86400

    Scheduled Task 7:00pm
    iwfreeze -j --


    From iwfreeze -h:

    Usage:
    iwfreeze [-h|-v]
    iwfreeze [-j] +N|-- [store]
    -h Display this usage information.
    -v Display this command's version number.
    +N Freeze for N seconds.
    -- Unfreeze immediately.
    -j Freeze or unfreeze only batch jobs, not entire store.
    store The name of the store to freeze or unfreeze. If
    omitted, freeze or thaw all stores.
TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs