Re: free vs. paid heroku app performance

2010-08-27 Thread David
That's what we do, setting up site monitoring is part of my normal
routine so I have something checking the site every 5 mins including
staging.

A couple free options:
http://aremysitesup.com/
http://www.uptimerobot.com/

And when you're ready for the big time:
http://pingdom.com/

(though I'll gladly hi-jack this thread if someone has better
suggestions...)

/david.

On Aug 26, 3:04 pm, Shane Witbeck  wrote:
> Can't you set something up to request a page on the app every so often to
> simulate traffic? I ran into the same issue on Google App Engine and did
> this to prevent the resources behind my app to not wind down.
>
> On Thu, Aug 26, 2010 at 2:32 PM, Eric Anderson wrote:
>
>
>
> > On 08/26/2010 11:30 AM, marcel wrote:
>
> >> Also, it often takes 10-20 seconds to get a page to load after a
> >> period of inactivity, compared to lightning speed for the production
> >> app.
>
> > If you are using the "free" heroku plan they do spin down the single dyno
> > when not in use. This makes sense as probably a LOT of those apps are just
> > something someone was playing with and does not use on a regular basis. Also
> > if they are not getting paid you can understand them wanting to minimize
> > resources.
>
> > OTOH if you pay for at least 2 dynos then they NEVER spin down meaning your
> > app is always nice and responsive even if nobody has it it for a while.
>
> > I WISH they offered the ability to purchase 1 persistent dyno. I don't
> > really need two (my app is lightly used) but I don't want the startup delay.
> > Seems if they offered 1 dyno that was persistent for $5-15/month that would
> > lower the barrier to entry for becoming a paying customer and allow them to
> > offer a single persistent dyno without dragging their profit down.
>
> > Eric
>
> > --
> > 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.
>
> --
> -Shane

-- 
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: Backup for MongoHQ Data

2010-08-27 Thread marcel
There is a warning on the mongodb site about using mongoexport/
mongoimport:

"Neither JSON nor TSV/CSV can represent all data types. Please be
careful not to lose or change data (types) when using this. For full
fidelity please use mongodump."

http://www.mongodb.org/display/DOCS/Import+Export+Tools#ImportExportTools-mongoexport

-- 
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: Ruby 1.9.2

2010-08-27 Thread morgoth
ping

-- 
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: free vs. paid heroku app performance

2010-08-27 Thread marcel
Thanks for the helpful tips about keeping the app responsive.

Has anyone else encountered ridiculously long slug compilation
(several hours), or is it just me? Its happened on at least 4 days in
the past month. I checked the heroku status page each time, but only
one of the times coincided with an official heroku problem. The
production app was unaffected except for the official outage.

I wonder if paying for a dyno would help reduce this problem too?

-- 
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: free vs. paid heroku app performance

2010-08-27 Thread Stefan Wintermeyer
Am 27.08.2010 um 15:27 schrieb David:
> That's what we do, setting up site monitoring is part of my normal
> routine so I have something checking the site every 5 mins including
> staging.

I think that might not be in the best interest of the Heroku guys. If they 
wanted it that way they'd have built it in.

  Stefan

-- 
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  -->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister Montabaur B14998

Asterisk 1.6: http://das-asterisk-buch.de
Ruby on Rails 3: http://ruby-auf-schienen.de
Videos and slides of AMOOCON: http://amoocon.de

-- 
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.



Running custom executables in your app

2010-08-27 Thread Martin Solli
Hello

I'd just like to share this with you guys, maybe it will come in handy
for somebody someday.

I have a rake task for importing data from an external source. The
data includes geographic information that need to be converted using
the proj command-line utility (http://trac.osgeo.org/proj/). I opened
a support ticket to have Heroku install this, which is a standard
package in most Linux distros. For some unspecified reason they were
not able to do this, but instead asked me to try and include a
pre-compiled binary for the AMD64 platform in a bin/ directory of my
app.

So I randomly selected the latest Ubuntu distro, and got the
libproj0_4.7.0-1_amd64.deb and proj-bin_4.7.0-1_amd64.deb from there.
These can be unpacked with tar xzvf , and somewhere inside the
executables and the libraries can be found. I copied the 'proj'
executable and the 'libproj.so.0' library to a new bin/ directory of
my app, checked them into git, and pushed to Heroku.

After a bit of experimenting in the console, this is how I got the
program to run:
`LD_LIBRARY_PATH=$LD_LIBRARY_PATH:#{ENV['APP_ROOT']}/bin
#{ENV['APP_ROOT']}/bin/proj 2>&1`

This includes the bin/ dir in the LD_LIBRARY_PATH environment
variable, so that the proj executable is able to find the libproj.so.0
library file. The '2>&1' part just combines STDOUT and STDERR, so that
I'm able to see the output.

parvati:some-app martin$ heroku console
Ruby console for some-app.heroku.com
>> `LD_LIBRARY_PATH=$LD_LIBRARY_PATH:#{ENV['APP_ROOT']}/bin 
>> #{ENV['APP_ROOT']}/bin/proj 2>&1`
=> "Rel. 4.7.1, 23 September 2009\nusage: proj [ -beEfiIlormsStTvVwW
[args] ] [ +opts[=arg] ] [ files ]\n"
>>

I love it when stuff works. Happy hacking!

-martin

-- 
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.



Problems deploying an EventMachine + Sinatra application

2010-08-27 Thread Jose M.
Hello!

I am trying to deploy an EventMachine + Sinatra application. I am
getting the next error when pushing the code:

Launching...timed
out
 ! App timed out during testfire. The previous version of your app
is still running.
 ! Backtrace follows:
 !   == Sinatra/1.0 has taken the stage on 4567 for production
with backup from Thin
 !   >> Thin web server (v1.2.7 codename No Hup)
 !   >> Maximum connections set to 1024
 !   >> Listening on 0.0.0.0:4567, CTRL+C to stop
 !   >> Stopping ...
 !   >> Thin web server (v1.2.7 codename No Hup)
 !   >> Maximum connections set to 1024
 !   >> Listening on 0.0.0.0:46785, CTRL+C to stop
 ! Heroku push rejected, app timed out during testfire

error: hooks/pre-receive exited with error code 1

Is it trying to run Thin twice? I am running the sinatra app inside an
event machine loop with another app using event machine sockets and I
am doing it like this:

#config.ru
require './app.rb'

#app.rb
require 'rubygems'
require 'bundler/setup'

require 'em-websocket'
require 'sinatra/base'
require 'thin'

EventMachine.run do
  class Websockets < Sinatra::Base
#sinatra app code
  end

  EventMachine::WebSocket.start(:host => "0.0.0.0", :port =>
8080, :debug => true) do |ws|
# websocket server code
  end

  Websockets.run!
end

Am I doing something wrong? Is not possible for this kind of
application to run in heroku?

Thanks in advance!

-- 
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: Using resque-scheduler

2010-08-27 Thread malomalo
You should be able to fork, but you wouldn't want multiple schedulers
so you'll be limited to 1 worker.

You can setup another app that is another environment of your
production app that only runs the scheduler.

If you get resque:scheduler to run let me know. I've run it on heroku
and it keeps getting killed for some reason then restarted, and it'd
go down sometimes for 20 minuites.

-Jon

On Aug 26, 1:46 pm, Idris  wrote:
> We're trying to use resque-scheduler with Heroku, but resque-scheduler
> requires two processes to be running, corresponding to the tasks
> resque:scheduler (which schedules jobs), and resque:work (which pops
> jobs off the queue and performs the work).  Given that workers on
> Heroku only run the jobs:work task, how can we get jobs:work to run
> BOTH of these resque jobs?  Should we fork inside of the jobs:work
> task? Do heroku workers even support fork?
>
> Thanks,
> Idris

-- 
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.



Heroku Console and Gems

2010-08-27 Thread Scott LaBounty
Should the gems that are in my .gems file be available to me in the Heroku
console? Are they available from my rakefile?

Thanks,

-- 
Scott
http://steamcode.blogspot.com/

-- 
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: Heroku Console and Gems

2010-08-27 Thread David Balatero
Not necessarily. .gems is deprecated IIRC, and only tells Heroku what to
install.

Your Rails app has to define gems in config/environment.rb w/ config.gem
directives.

Alternatively, switch to Bundler + Gemfile, and manage gems in one place.

On Fri, Aug 27, 2010 at 1:35 PM, Scott LaBounty  wrote:

> Should the gems that are in my .gems file be available to me in the Heroku
> console? Are they available from my rakefile?
>
> Thanks,
>
> --
> Scott
> http://steamcode.blogspot.com/
>
> --
> 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.
>

-- 
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: Heroku Console and Gems

2010-08-27 Thread Scott LaBounty
Hmm... I'm not using Rails. If I do make the switch to Bundler/Gems would
the gems be available via rake and the console?

Scott

On Fri, Aug 27, 2010 at 1:37 PM, David Balatero  wrote:

> Not necessarily. .gems is deprecated IIRC, and only tells Heroku what to
> install.
>
> Your Rails app has to define gems in config/environment.rb w/ config.gem
> directives.
>
> Alternatively, switch to Bundler + Gemfile, and manage gems in one place.
>
> On Fri, Aug 27, 2010 at 1:35 PM, Scott LaBounty wrote:
>
>> Should the gems that are in my .gems file be available to me in the Heroku
>> console? Are they available from my rakefile?
>>
>> Thanks,
>>
>> --
>> Scott
>> http://steamcode.blogspot.com/
>>
>> --
>> 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.
>>
>
>  --
> 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.
>



-- 
Scott
http://steamcode.blogspot.com/

-- 
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: Heroku Console and Gems

2010-08-27 Thread David Balatero
I believe so, as long as the Rakefile + your app loaded Bundler.

On Fri, Aug 27, 2010 at 1:44 PM, Scott LaBounty  wrote:

> Hmm... I'm not using Rails. If I do make the switch to Bundler/Gems would
> the gems be available via rake and the console?
>
> Scott
>
>
> On Fri, Aug 27, 2010 at 1:37 PM, David Balatero wrote:
>
>> Not necessarily. .gems is deprecated IIRC, and only tells Heroku what to
>> install.
>>
>> Your Rails app has to define gems in config/environment.rb w/ config.gem
>> directives.
>>
>> Alternatively, switch to Bundler + Gemfile, and manage gems in one place.
>>
>> On Fri, Aug 27, 2010 at 1:35 PM, Scott LaBounty wrote:
>>
>>> Should the gems that are in my .gems file be available to me in the
>>> Heroku console? Are they available from my rakefile?
>>>
>>> Thanks,
>>>
>>> --
>>> Scott
>>> http://steamcode.blogspot.com/
>>>
>>> --
>>> 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.
>>>
>>
>>  --
>> 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.
>>
>
>
>
> --
> Scott
> http://steamcode.blogspot.com/
>
> --
> 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.
>

-- 
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: Heroku Console and Gems

2010-08-27 Thread Scott LaBounty
David,

Thanks, I'll take a look at using Bundler.

For those of you wondering, I'm still trying to get migrations to work from
Sequel. I've grabbed a bit of code from sequel for migrations, put it into
my rakefile, but it's still not working. It looks like the require 'sequel'
doesn't happen (or at least that's my impression from doing the same thing
in the heroku console).

Scott

On Fri, Aug 27, 2010 at 1:58 PM, David Balatero  wrote:

> I believe so, as long as the Rakefile + your app loaded Bundler.
>
>
> On Fri, Aug 27, 2010 at 1:44 PM, Scott LaBounty wrote:
>
>> Hmm... I'm not using Rails. If I do make the switch to Bundler/Gems would
>> the gems be available via rake and the console?
>>
>> Scott
>>
>>
>> On Fri, Aug 27, 2010 at 1:37 PM, David Balatero wrote:
>>
>>> Not necessarily. .gems is deprecated IIRC, and only tells Heroku what to
>>> install.
>>>
>>> Your Rails app has to define gems in config/environment.rb w/ config.gem
>>> directives.
>>>
>>> Alternatively, switch to Bundler + Gemfile, and manage gems in one place.
>>>
>>> On Fri, Aug 27, 2010 at 1:35 PM, Scott LaBounty wrote:
>>>
 Should the gems that are in my .gems file be available to me in the
 Heroku console? Are they available from my rakefile?

 Thanks,

 --
 Scott
 http://steamcode.blogspot.com/

 --
 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.

>>>
>>>  --
>>> 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.
>>>
>>
>>
>>
>> --
>> Scott
>> http://steamcode.blogspot.com/
>>
>> --
>> 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.
>>
>
>  --
> 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.
>



-- 
Scott
http://steamcode.blogspot.com/

-- 
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.



[ANN] new crashed process handling

2010-08-27 Thread Adam Wiggins
We've just rolled out a new version of our process manager, with streamlined
handling of crashed processes.  A lot of you guys have been frustrated when
your workers crash (libXML segfaults, for example) because the restart
behavior was somewhat unpredictable.

The new version follows a very simple algorithm: any process that crashes
will be restarted immediately, with a cooldown time of ten minutes.  This
applies to all process types including web processes (dynos).

We've also unified the behavior of crashed dynos with crashed workers.  Now
if you push up a bad deploy (missing a gem, etc) you won't be shown the
stack trace in the browser, and instead can find the stack trace and
debugging info by running "heroku logs".  This makes the workflow for
handling a crashed process the same as handling an exception during the
request cycle (HTTP 500): your users are displayed a generic page, and you
the developer can look up the problem in your logs.

A description of the new crash policy, and some documentation for the
"heroku ps" command (great for introspecting on the state of your processes)
can be found here:

http://docs.heroku.com/ps

We welcome your feedback.  Please reply (here on the mailing list, or to me
privately) if you have any thoughts, especially if you've seen it in action
on your own crashed processes.

-- 
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.



Heroku database connection crash

2010-08-27 Thread Mike
I got this message in my Exceptional logs:

"PGError: server closed the connection unexpectedly\n\tThis probably
means the server terminated abnormally\n\tbefore or while processing
the request.\n:"

What could have caused this and how can I prevent it?

-- 
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.