Hi,

I'm running beanstalkd 1.4.4 on RHEL5update3. I've written a simple
application in perl using Beanstalk::Client that consists of 1
producer and 1 client. The producer is a file monitor that watches a
list of directories for incoming files and creates a job in the queue
when a file appears. The client grabs the file and does something with
it. This has been running well for a period of time, but now I find
that files are being left in their incoming directories. The producer
logs indicate that a job is successfully being created ( I get a valid
job id back from the put) for the orphan files. The client logs show
that there are gaps in the list of ids being reserved and processed,
as much as 1 out of every 8 or so ids, corresponding to the ids of the
orphan file jobs. The rate of job creation is relatively low for what
I've read about beanstalkd, probably less than 1000/min.

The producer is creating jobs like this:

 $queue->use($tube);
 my $result = $queue->put({data=>$file,});
 if ($result) {
      my $id = $result->id;
      logmsg("$file, queued, $id\n");
 } else {
      logmsg("$file, error: $queue->error\n");
 }

The client is processing jobs like this:

while ( 1 ) {
    my $item = $queue->reserve;
    if ($item) {
        my $id = $item->id;
        my $file = $item->data;
        my $tube = $item->tube;
        logmsg("got $id: $tube: $file\n");
        if ( -f $file ) {
           do stuff
        }
         $queue->delete($id);
      }
}

I thought that maybe if the file processing took too long a job might
get released, but I should still see the id and filename in the logs,
but I don't find any trace of the missing job ids. Stats on the tubes
don't show any buried or delayed jobs.

What am I missing (besides my jobs)?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"beanstalk-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/beanstalk-talk?hl=en.

Reply via email to