SharedQueue failed to initialise

Sep 4, 2008 at 10:03 AM
Hi,
I've been getting this error more frequently - admittedly, my use of WSP has also increased.

What does tihs indicate?  Sometimes it recovers, and sometimes it doesn't, so is there a recommended way to force a re-initialisation.

Alternatively, does it indicate that something more serious is wrong, and I should be looking to find the cause?

DS
Sep 4, 2008 at 10:27 AM
BTW - it carries a (HRESULT:8) prefix.
Coordinator
Sep 4, 2008 at 6:37 PM
This should be the error you get when the WspEventRouter service is not running. The WspEventRouter creates the shared memory and all other applications essentially join the shared memory. If the shared memory doesn't exist then you get the error that the SharedQueue failed to initialize. After an application successfully open the shared memory, the WspEventRouter could be stopped and things will work OK until the shared memory queue is filled up. Also during this time, other applciations could start and open the same shared memory even though WspEventRouter is not running.

The point is, only the WspEventRouter can create the shared memory and it is the only process that can mark events as being processed which are placed in the circular buffer (shared memory). If WspEventRouter is not running, you can get the SharedQueue failed to initialize error and the circular buffer will eventually fill up.
Sep 4, 2008 at 9:22 PM
Thanks - I get this error frequently, but intermnittently.  The router is running.  I have several publishers and subscribers, most of which handle messages without interruption, but one in particular generates this exception often and intermittently.  It cycles round the loop generating the error between 1 and 10 times, then it succeeds and carries on.

I will go through the code and see what is happening.  I will report back if I spot anything.
Coordinator
Sep 4, 2008 at 10:56 PM
I have never seen this error other than when the router isn't running. I too run many publishers and subscribers concurrently. So I would be interested if you can identify the issue you're seeing.
Sep 5, 2008 at 1:50 PM
hihi,

The problem was that I was calling the PublishManager() constructor before every Publish(byte[]) call.  I've changed it to only construct as needed, and so far it has been rock solid.

A bit silly, so apologies.

DS