Re: Best solution to replace this cron job

2010-07-28 Thread Russell Quinn
Thanks for the reply Morten. Repeated_job looks like just the ticket
and a very elegant and simple solution too.

One further question: I presume that this will require 1 worker to
function and that this will negate the need for the Cron add-on? Will
calling rake::cron every 15 minutes via this method hit any sort of
limiter designed to stop people circumnavigating the paid hourly Cron
add-on? In other words: how does the business side of this work? :)

Thanks again,

Russell.


On Jul 27, 10:41 pm, Morten Bagai mor...@heroku.com wrote:
 Hi Russell,

 One of our engineers made this fork of DJ that I believe does what you 
 want:http://github.com/ddollar/repeated_job. Let me know if there's anything 
 else we can help with. We're looking forward to having you on our platform.

 Best,

 Morten

 On Jul 27, 2010, at 9:15 AM, Russell Quinn wrote: I'm migrating an iPhone 
 app backend server from Brightbox to Heroku.
  One thing the app does is perform a rake task every 15 minutes to
  check for various things including sending Push Notifications in
  batches.

  I understand that this rake task should probably be run in a Delayed
  Job task, but how do I put one new Delayed Job task in the queue every
  15 minutes? i.e. There is no user task performed to trigger the
  creation of new jobs, rather they need to be created every 15 minutes.

  Thanks,

  Russell.

  --
  You received this message because you are subscribed to the Google Groups 
  Heroku group.
  To post to this group, send email to her...@googlegroups.com.
  To unsubscribe from this group, send email to 
  heroku+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/heroku?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Cron timeouts

2010-07-28 Thread Kevin Patel
I believe cron can run for longer. So it might be your query (query
timeout is 30sec) that might be timing out.

\Kevin

On Jul 27, 10:16 am, Neil Middleton neil.middle...@gmail.com wrote:
 Can Cron jobs run for longer than the 30 second limit that's set for regular
 Dyno requests?

 Neil Middleton

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Occasional Memcached::ServerIsMarkedDead Error

2010-07-28 Thread Perry Krug
Chris, are you seeing these errors on a regular basis?  What is the
path to resolution?

I'll have to dig deeper, but the NoMemoryError: failed to allocate
memory error doesn't seem like a response coming from the server, is
it possible your client code ran out of memory?

Perry

On Jul 26, 8:21 am, chris mcclellan...@gmail.com wrote:
 Alright, maybe the memcached-northscale gem isn't working as expected.
 Got some strange errors over the weekend:

 NoMemoryError: failed to allocate memory

 .bundle/gems/gems/memcached-northscale-0.19.5.3/lib/memcached/
 memcached.rb:309:in `dump'
 .bundle/gems/gems/memcached-northscale-0.19.5.3/lib/memcached/
 memcached.rb:309:in `set'
 .bundle/gems/gems/memcached-northscale-0.19.5.3/lib/memcached/rails.rb:
 72:in `set'
 .bundle/gems/gems/activesupport-2.3.8/lib/active_support/cache/
 mem_cache_store.rb:82:in `write'
 .bundle/gems/gems/activesupport-2.3.8/lib/active_support/cache/
 strategy/local_cache.rb:51:in `write'
 .bundle/gems/gems/activesupport-2.3.8/lib/active_support/cache.rb:
 165:in `fetch'

 What we're caching shouldn't come anywhere close the max key size in
 memcached.

 Also got some of these:

 Memcached::ServerIsMarkedDead: Key {Product:
 754:1=mc2.ec2.northscale.net:11211:8, Product:
 756:1=mc2.ec2.northscale.net:11211:8, Product:
 979:1=mc2.ec2.northscale.net:11211:8, Product:
 978:1=mc2.ec2.northscale.net:11211:8, Product:
 980:1=mc2.ec2.northscale.net:11211:8}

 .bundle/gems/gems/memcached-northscale-0.19.5.3/lib/memcached/
 memcached.rb:604:in `check_return_code'
 .bundle/gems/gems/memcached-northscale-0.19.5.3/lib/memcached/
 memcached.rb:502:in `get'
 .bundle/gems/gems/memcached-northscale-0.19.5.3/lib/memcached/rails.rb:
 67:in `get_multi'
 .bundle/gems/gems/activesupport-2.3.8/lib/active_support/cache/
 mem_cache_store.rb:58:in `read_multi'

 Any help/suggestions?

 Thanks,

 Chris

 On Jun 29, 12:24 pm, Sean Lynch se...@literati.org wrote:



  I've sent a pull request to Fauna so hopefully the changes I have 
  inmemcached-northscale will be in the real gem soon. Unfortunately, I 
  can't really help with making Rails find the right gem, though; I'm a C++, 
  Python, and Erlang guy mostly ;-)

  On Jun 29, 2010, at 7:47 AM, shenry wrote:

   I've got the same occasional error, and tried to usememcached-
   northscale but Rails couldn't find the gem on my machine. In
   environment.rd I tried

   config.gem 'memcached-northscale' # replaces config.gem 'memcached'

   But no luck. I have thememcached-northscale gem version 0.19.5.2
   installed locally, what am I missing? TIA

   On Jun 17, 1:18 pm, chris mcclellan...@gmail.com wrote:
   This nortchscale-memcachedgem has been working great for me in
   production over the last few days.

   Thanks! Heroku docs should be updated to point to this gem...

   On Jun 16, 1:42 pm, Perry Krug perryk...@gmail.com wrote:

   Hi Chris,
   We believe that these issues are caused by bugs in the default
   memcachedlibrary in the Gem.  Can you change over to the 'memcached-
   northscale' library?  You should just be able to replace 'memcached'
   with 'northscale-memcached' in the Gemfile.  Leave the Memcached for
   the required field.

   Let me know if that helps or if there's anything else that I can do to
   help.

   Perry Krug
   NorthScale, Inc.

   On Jun 15, 3:36 pm, opsb oll...@googlemail.com wrote:

   Hey

   I've been seeing the same problem. Where I can get hold of your
  memcached-northscale gem?

   Cheers,
   Olly

   On Jun 8, 9:31 pm, Sean Lynch se...@literati.org wrote:

   On Jun 8, 2010, at 10:11 AM, chris wrote:

   Hey y'all,

   I'm getting an occasionalMemcached::ServerIsMarkedDeaderror when
   folks hit the app. It seems to work fine if I wait a while or just
   restart the app.

   What do you guys do to catch this error? begin rescue retry? fail
   gracefully (somehow?)?

   Hi, Chris.

   I've made some modifications to Fauna's memcache-client compatibility 
   layer, because memcache-client never throws exceptions whereas the 
   compatibility layer is (which is why you're seeing these). I've 
   uploaded a test gem as  memcached-northscale, and once I hear back 
   from people that it actually works and solves their issues, I'll 
   submit the modifications upstream.

   -Sean

   --
   You received this message because you are subscribed to the Google Groups 
   Heroku group.
   To post to this group, send email to her...@googlegroups.com.
   To unsubscribe from this group, send email to 
   heroku+unsubscr...@googlegroups.com.
   For more options, visit this group 
   athttp://groups.google.com/group/heroku?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.