I am trying to run a thread pool(java threadpool on jruby) I am having
problems with random exceptions being raised. Please help me out in
understanding and solving them.
the error code
Exception in thread "pool-1-thread-154" /home/goutham/.rvm/gems/
ruby-1.8.7-p330/gems/beanstalk-client-1.1.0/lib/beanstalk-client/
connection.rb:183:in `interact': Mutex is not owned by calling thread
(ThreadError)
from /home/goutham/.rvm/gems/ruby-1.8.7-p330/gems/beanstalk-
client-1.1.0/lib/beanstalk-client/connection.rb:106:in `delete'
from /home/goutham/.rvm/gems/ruby-1.8.7-p330/gems/beanstalk-
client-1.1.0/lib/beanstalk-client/job.rb:49:in `delete'
from ./queue_adaptors/beanstalkd.rb:58:in `close_job'
from ./qmonitor.rb:49:in `post_worker_process'
from ./qmonitor.rb:36:in `watch_queue'
from :1
...internal jruby stack elided...
from Beanstalk::Connection.interact(/home/goutham/.rvm/gems/
ruby-1.8.7-p330/gems/beanstalk-client-1.1.0/lib/beanstalk-client/
connection.rb:106)
from Beanstalk::Connection.delete(/home/goutham/.rvm/gems/ruby-1.8.7-
p330/gems/beanstalk-client-1.1.0/lib/beanstalk-client/job.rb:49)
from Beanstalk::Job.delete(./queue_adaptors/beanstalkd.rb:58)
from Beanstalkd.close_job(./qmonitor.rb:49)
from QMonitor.post_worker_process(./qmonitor.rb:36)
from QMonitor.watch_queue(:1)
from (unknown).(unknown)(:1)
on a average .. for executing 5000 jobs in 400 threads I got 5 such
exceptions .. all of them were about delete and mutex lock. Except
thread everything else is in ruby 1.8.7
Complete log is here http://rapidshare.com/files/445578504/log3.txt
In log:
1> hello 1 --- 8001 :: this reperesent thread 1 has job hello 1 with
id 8001
closed - (job "hello 6")--8006 :: this represent job "hello 6" with id
8006 has closed
failed - (job "hello 6")--8006 :: this represent job "hello 6" with id
8006 has failed(bury)
--
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.