I have a Resque Job backed by ActiveRecord that saves a post message to the database.
Have 7 worker instances running. I send 20K records to my sinatra application.
When i query the redis database, i see the following results…
redis> get resque:stat:processed:localhost:6929:default
"5696"
redis> get resque:stat:processed:localhost:6930:default
"1"
redis> get resque:stat:processed:localhost:6942:default
"1"
redis> get resque:stat:processed:localhost:6953:default
"10854"
redis> get resque:stat:processed:localhost:6959:default
"3446"
redis> get resque:stat:processed:localhost:6972:default
"1"
redis> get resque:stat:processed:localhost:6986:default
"1"
can anyone comment on it please?
4 of the 7 workers only processed 1 job each in their lifetime
Finally figured it out when i replaced ActiveRecord with RDBI. I was getting the following error when my workers were trying to connect to the oracle database
After googling, i stumbled upon this post http://kr.forums.oracle.com/forums/thread.jspa?messageID=3793101 . So, i decided to pass the -Djava.security.egd=file:///dev/urandom option to my jvm. I edited the settings in glassfish’s jvm options, but that did not work as those settings benefited my sinatra app but not the resque workers running in the background.
So, i had to start the resque workers by passing the jvm argument. I wrote a rake task to do the same.