views:

26

answers:

0

I am working on building a Ruby on Rails v2.3.8 real estate application. I've written a rake task to pull in the property listings and photos. The app uses rets4r (specifically josephholsten-rets4r) to talk to a RETS-based server and Paperclip is used to manage the property photos and push them up to S3.

The problem I'm seeing is the rake task never completes. It will always crash at some point and it's never the same spot. One time it crashed after 45 min, after some minor changes (added some begin/rescue blocks to try and track down the error), it seems to run longer (2-12 hours), but still crashes.

The error I get is always "Rake aborted" and then "thread [memory address] tried to join itself." Looking into the logs provides nothing helpful. Just the standard Paperclip log messages. I'm also not deliberately trying to do anything multi-threaded in the rake task.

Update: I was using the gem version 1.1.17 of rets4r. However, I notice on the Github page for the project, there have been quite a few commits since that version was tagged. One of those commits talks about removing the use of threads.