Friday, 13 September 2013

pg:psql select shows blank space for rows even though count is one; aka stuck Queue Classic job?

pg:psql select shows blank space for rows even though count is one; aka
stuck Queue Classic job?

I am trying to track down what is happening with a stuck background
process in my app and need a push in the right direction.
I have a rails app on heroku that is processing some xml. This is done in
a background job using Queue Classic. I also have HireFire setup to turn
the workers on and off when they are not needed.
This seems to be working for the most part. However, every now and then it
seems like a job is getting stuck and causing all manner of havoc: Workers
are not turned off but new jobs are not being processed.
I guess this is a two part question.
Part 1 (Specific noob-like question): When I run heroku pg:psql to look at
the queue_classic_jobs table I can get the count, but when I try a select
on the table all I get is a giant black space where the rows should be.
Any idea why its not showing the rows? Is this normal? Is it due to the
lock on the table? or is something really not right here?

Part 2 (Bigger vague question): So asides from the psql output not being
helpful there is a bigger issue. A job is getting stuck and I need to
track down the culprit.
When processing some of the xml there have been some validation errors
that have caused the job to get stopped in its tracks. Is it possible that
these errors are stopping QC from closing off the job properly? Do I need
to / How do I handle this?
Or is it possible that this is something crazy silly like a job comes in
at the same time that HireFire tries to turn off the worker and it never
gets sent through to the background job properly or ... something ... ?!
Thoughts?

No comments:

Post a Comment