Error 7802 using WorkMgr

Hi all,

I'm facing the error 7802 ("Worker job/s unexpectedly shut down") when trying to work with the Queue Manager. Since today it was working fine, but suddenly today it started failing when arriving to the line:

Set sc=queue.WaitForComplete()

The method is pretty simple: first I invoke the queue manager by doing set queue=$SYSTEM.WorkMgr.Initialize("/multicompile=1",.tSc,64), and then into a loop I call a method exactly 64 times. Then after the first 64 processes are done, the system launches 64 more jobs.

But strange enough, while the first bunch of 64 processes are being processed (so the WaitForComplete() is taking place) the system throws the error 7802 and stops working. The try/catch shows this text: RunDaemon+104^%SYS.WorkQueueMgr

I've tried reducing the amount of processes, but it keeps failing.

I had never seen this error before and I'm not being able to trace the problem. Anyone has faced this error before? Any ideas or suggestions will be highly appreciated.

Thanks!

 

  • 0
  • 0
  • 65
  • 0
  • 1

Answers

I can't remove the question, so I answer myself. The problem was at the routine called by the queue: a "lock" instruction seemed to break down everything.

So, removing the line solved the problem :-) Now I just need to know why locking a global messes the whole thing up :-O