PSI Calls Hang in Queue in ReadyForProcessing Job State

B

BradleyWard

Context: C# application using PSI API to interact with Project Server 2007.

I am having a problem where I make a PSI call to put something on the
Project Server job queue. Once I make the call, I can go to PWA and go to the
Server Settings | Queue | Manage Queue screen where I can see that the
request is in the queue, but it has a status that says "Waiting To Be
Processed" which I assume is the same thing as the ReadyForProcessing value
in the JobState enum.

The request just sits there forever and never completes.

When I first encountered this problem there were other jobs in the queue in
various states and I assumed my new request must be blocking on one of them.
So I went in and removed all other jobs in the queue and even left PS2007
alone long enough for the background cleanup job to clear the old cancelled
entries in the queue. Now that I had a completely empty queue, I tried it and
once again, it hangs forever.

The particular PSI call I am making right now is the
QueueCreateProjectAndCheckOut call. Earlier I was being blocked in the same
way as this when I made the QueueCheckInProject call to do a forced checkin
(my PSI application first checks to see if a project already exists using the
name I am about to use; if it does, it does a forced checkin call and then a
QueueDeleteProjects call to delete the project. It then proceeds with the
QueueCreateProjectAndCheckOut call to create the new project. I changed my
project name to a new name so that it did not have to do the checkin and
delete calls, and now it just blocks on the QueueCreateProjectAndCheckOut
call.

It seems that something is blocking my request from continuing. What could
that be? How can I determine what it may be blocked on? If there is some
capability to diagnose this using PWA I have not been able to find it.

Any help with this would be most appreciated!

Thanks!
 
S

Stephen Sanderlin

B

BradleyWard

Thanks Stephen. It turns out it was the PS queue service as you suspected. It
was in some sort of hung state. Stopping and starting that service made it
work just fine.

Working with it further, I found that after rebooting the system, my first
requests would always hang up like that. So based on the evidence I have
seen, it seems that the PS queue service routinely boots up in a hung
position.

My client to PS is also a service. I had to add error handling and retry
logic in my service so that when it first starts, it does some simply query
to SQL Server and if it fails, it waits awhile then trys again. Once that
passes (i.e. I know SQL Server is up and running), I do some other simple
call to PS2007 and wait and retry until it looks like it is running. Once
this works, I programmatically shutdown the PS Queue service then restart it.
After adding all this logic I can now reliably reboot my server and my
service will come up and work. This is a big hack that I should not have to
do, but it seems to be working just fine.

Thanks,

Brad
 
S

Stephen Sanderlin

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top