Re: Connecting to Heroku Postgres Databases

2015-09-16 Thread Daniel Farina
On Wed, Sep 16, 2015 at 2:27 PM Samrat shah  wrote:

> Hi All,
>
> I am new to Heroku. I am trying to reinsert some of the error ed  record.
> I need to connect to Heroku database and run the query. Can I connect to
> database and run my query within Heroku connet app? If not what is the best
> way to achieve this outside Heroku. Anyhelp is much appreciated.
>

One of my colleagues and eldest hackers on Heroku Connect, Scott
Persinger, writes:

"""
I think he's asking how to run pg:psql !

He should:
  1. User heroku pg:psql to connect to his database
  2. use "update  where XX" to touch rows to re-send them to SF
"""

Sounds like triggering any kind of update in the record at hand is the
workaround for this situation where Connect has given up for some reason.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: BUILD_DIR and CACHE_DIR for compiling through a custom buildpack

2015-01-07 Thread Daniel Farina
On Wed, Jan 7, 2015 at 2:46 AM, aspal  wrote:
> How to specify BUILD_DIR and CACHE_DIR arguments for  custom buildpacks?
> Should I set   heroku config:set   BUILD_DIR=path_2_srcor put it in the
> compile,detect scripts?
> My app is not compiling when source files are put in another dir in app's
> root folder.

These are passed as arguments to the program you write for the build
pack. You do not set them.

In shell, these would be $1 (for BUILD_DIR) and $2 (for CACHE_DIR)
customarily.  There's one more, for "ENV_DIR", see
https://devcenter.heroku.com/articles/buildpack-api for details.

I'm not sure exactly what your problem is with the compilation, but
one maddening possibility I've seen that sounds akin to yours if one
is using Macintosh is that "git" tracks content in a case sensitive
manner, and as a general rule Macintosh file systems are not so.  One
can confirm things by seeing multiple case variations of the same
directory in git ls-tree -r HEAD.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CouchDB Heroku Addon

2014-10-25 Thread Daniel Farina
On Oct 25, 2014 12:35 PM, "Travis Webb"  wrote:
>
> There used to be two CouchDB providers in the Heroku add-ons section, but
it looks like they are no longer there. I'm considering building a couchdb
hosting addon; would the Heroku team likely accept such an addon?

Try contacting add...@heroku.com.  I don't anything about it, but I'd be
optimistic.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Continuously running python file on Heroku

2014-05-23 Thread Daniel Farina
On Fri, May 23, 2014 at 2:13 PM, Ozan Yildiz  wrote:
> Hello everyone,
>
> I have a python file which fetches information from a web site continuously
> (It has a while True loop inside). And its process has to be alive all the
> time.
> Is it possible to do this on Heroku if it is what's the right way to do
> this?

You probably want a "worker" process.

It stays alive for 24 hours (ish) tops, and will be automatically
restarted at that time.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Write files in heroku

2014-04-24 Thread Daniel Farina
On Thu, Apr 24, 2014 at 3:18 PM, Anand Soni  wrote:
> Hi I am trying to write file in heroku as per the file system allowed in
> heroku. I want to do my audio file upload to S3 async manner, so I am using
> delayed_job for that. what I am doing is I am first writing content into
> file and then create a job which will upload to S3 then delete file created
> locally.
>
> For this I am writing file in "#{Rails.root}/tmp". When I check log it shows
> created but when my job worker try to access it, it never found at same
> location. I am not understating why its happening even I didn't get any
> error creating file in tmp folder in my rails app and still my job worker
> can't find the file in tmp folder
>
> Please help me to solve this. Thanks.

The file system is not shared across different dynos: by putting stuff
in delayed_job it's going to be executed by another worker that does
not have access to that temporary file.

If the file is a "simple" upload from the user, you might want to
consider pre-signed S3 urls.  Otherwise your only other async-ish
option is to fork a worker within the web dyno that has access to the
temporary file while also returning a request immediately.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to re-sync cygwin and heroku?

2014-01-10 Thread Daniel Farina
On Fri, Jan 10, 2014 at 11:08 AM, Scott Meyers  wrote:
> Newbie here (obviously!).
>
> I'm starting a Django project in Cygwin.  I push to Heroku.  I'm playing
> around, checking heroku logs, and my power goes out.  So I boot my computer,
> get back into Cygwin, go back into my project's root.  How do I sync it with
> Heroku again?  If I type heroku ps or heroku login or anything, I get
> "heroku: command not found".  How do I link it back up so my cygwin and
> heroku start talking to each other again?  Thanks!

Did the 'heroku' commands once work in the Cygwin shell?  Because once
you have a Heroku git remote set up you don't have to (and might
accidentally not) rely on the 'heroku' CLI at all.  'git push' does
the entire deploy.  You may have been working for a while with
'heroku' not in $PATH.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Cannot able to make faye working.

2013-12-14 Thread Daniel Farina
On Sat, Dec 14, 2013 at 12:01 AM, Logesh m  wrote:
> I was using faye in OpenShift so far as heroku does not support but since i
> heard that heroku supporting web sockets, i am trying to move the faye
> server app to heroku but could not able to make it work. Please help me. I
> have listed the files that i have

Did you check the DevCenter?  WebSockets is in beta, so you'll need to
enable a flag at least.  I'm not intimately familiar with the symptoms
when that's not enabled though.

https://devcenter.heroku.com/articles/heroku-labs-websockets

You can also try a support ticket or, maybe even better in this
particular case, https://discussion.heroku.com/

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: how to sync_clock time of Heroku to AWS S3 image upload with carrierWave

2013-10-26 Thread Daniel Farina
On Fri, Oct 25, 2013 at 10:51 PM, jayesh dalwadi
 wrote:
> I got an error every time when image upload happens
>
> RequestTimeTooSkewed
> The difference between the request time and the current time is too
> large.
>
> Thu,24 Oct 2013 22:17:41+
> 2013-10-24T22:33:21Z
> The time difference is more then 15 Min. how to set this to actual time
> please help us to set heroku time to actual time.
>
> We are using carrierwave v 0.6.2, mini_magick v 3.5.0 ,rails 3.2.13 and ruby
> 1.9.3 in our application

Do you really mean *every* time?  It doesn't look like Heroku suffers
that much skew in this test:

date; for i in {1..10}; do heroku run date; done;
Sat Oct 26 07:57:45 PDT 2013
Running `date` attached to terminal... up, run.7906
Sat Oct 26 14:57:43 UTC 2013
Running `date` attached to terminal... up, run.7623
Sat Oct 26 14:57:47 UTC 2013
Running `date` attached to terminal... up, run.3905
Sat Oct 26 14:57:49 UTC 2013
Running `date` attached to terminal... up, run.9868
Sat Oct 26 14:57:52 UTC 2013
Running `date` attached to terminal... up, run.3958
Sat Oct 26 14:57:55 UTC 2013
Running `date` attached to terminal... up, run.2547
Sat Oct 26 14:57:58 UTC 2013
Running `date` attached to terminal... up, run.7080
Sat Oct 26 14:58:07 UTC 2013
Running `date` attached to terminal... up, run.4414
Sat Oct 26 14:58:10 UTC 2013
Running `date` attached to terminal... up, run.7743
Sat Oct 26 14:58:13 UTC 2013
Running `date` attached to terminal... up, run.4459
Sat Oct 26 14:58:21 UTC 2013

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Issues getting custom binary to run on Heroku

2013-10-09 Thread Daniel Farina
On Oct 9, 2013 6:25 PM, "Robert Fletcher"  wrote:
>
> The file output on Heroku was the same as local:
>
> ~ $ file bin/lp_solve
> bin/lp_solve: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped

Great, that means 'file' can be used to spot such problems.  Thanks for
looking into that.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Issues getting custom binary to run on Heroku

2013-10-09 Thread Daniel Farina
On Wed, Oct 9, 2013 at 5:56 PM, Robert Fletcher  wrote:
> Yeah, I figured I'd try to get it compiling locally on my Linux machine and
> once that's working maybe try using a tool like anvil
> (https://github.com/heroku/anvil) to compile on Heroku. I tried vulcan last
> week and ran into some issues with that. Thanks so much for your help. I've
> been having a slow and unproductive conversation with Heroku support for a
> week.

I will suggest there was a lot of luck in that you pasted the output
of ldd from your machine in getting a likely root-cause.

Also, obscura like the 'file' command may have helped (does that
display a reasonable thing on Heroku for the binary in-place that
Heroku cannot understand)?  That'd be helpful to know.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Issues getting custom binary to run on Heroku

2013-10-09 Thread Daniel Farina
On Wed, Oct 9, 2013 at 5:48 PM, Robert Fletcher  wrote:
> Hmm, okay, so I'm going to have to compile it myself I take it then... Ran
> into some hurdles with that, too, but I'll dig in deeper on that side of
> things.

You could try to, in unprincipled manner, use an amd64 binary you pick
up from some remotely compatible userland and pray a bit, but it would
be best to make a compilation process for this tool on Heroku as to
get a match in toolchain.

But the unprincipled mechanism may be worth a try just to derisk
things a tiny bit, should it basically work.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Issues getting custom binary to run on Heroku

2013-10-09 Thread Daniel Farina
On Wed, Oct 9, 2013 at 5:43 PM, Robert Fletcher  wrote:
> Yeah, that's the weird thing. When I run it on my local machine:
>
> $ ldd bin/lp_solve
> linux-gate.so.1 =>  (0xf7782000)
> libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7733000)
> libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf772e000)
> libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7584000)
> /lib/ld-linux.so.2 (0xf7783000)

Heroku is on amd64.  It does not have the supporting libraries in the i386 arch.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Issues getting custom binary to run on Heroku

2013-10-09 Thread Daniel Farina
On Wed, Oct 9, 2013 at 5:37 PM, Robert Fletcher  wrote:
> It tells me "not a dynamic executable"

Are you sure something reasonable is in that file?  To wit, this
output is hard to believe with nearly anything compiled in the current century.

Consider use of the 'file' command:

$ file /bin/bash
/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Issues getting custom binary to run on Heroku

2013-10-09 Thread Daniel Farina
On Wed, Oct 9, 2013 at 5:32 PM, Robert Fletcher  wrote:
> The more I think about it, I think lp_solve may be running, but it's trying
> to access some file that isn't there. It just isn't being explicit about
> which file it's looking for.

I was thinking something on similar lines.  You may want to consider
"ldd" on the executable to see if the program runs and maybe
dynamically links basically properly, e.g.:

~ $ ldd /bin/bash
linux-vdso.so.1 =>  (0x7fffabdfe000)
libncurses.so.5 => /lib/libncurses.so.5 (0x7f448c3cc000)
libdl.so.2 => /lib/libdl.so.2 (0x7f448c1c8000)
libc.so.6 => /lib/libc.so.6 (0x7f448be41000)
/lib64/ld-linux-x86-64.so.2 (0x7f448c622000)

If that seems to go okay, then the program itself is emitting that
output.  You may also want to consider using: "echo $?" to similar
effect:

~ $ foo
bash: foo: command not found
~ $ echo $?
127
~ $ false
~ $ echo $?
1
~ $ true
~ $ echo $?
0

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Issues getting custom binary to run on Heroku

2013-10-09 Thread Daniel Farina
On Wed, Oct 9, 2013 at 5:11 PM, Robert Fletcher  wrote:
> Yeah, I've logged in with `heroku run bash`. The file is marked executable
> and when I try executing it directly I get the same error. It works fine
> locally.

How do you "execute it directly"?  Like "./lp_solve"?  Or are you
doing "lp_solve" and hoping $PATH does the trick?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Issues getting custom binary to run on Heroku

2013-10-09 Thread Daniel Farina
On Wed, Oct 9, 2013 at 5:05 PM, Robert Fletcher  wrote:
> Hey all,
>
> I've been trying every avenue possible to figure out how to get this thing
> working. All I'm trying to do is get lp_solve running with my Rails app. As
> near as I can tell it's a stand-alone binary that I should just be able to
> drop into the bin directory of my project and be off and running, but when I
> try to execute it it says "No such file or directory". More details on my
> StackOverflow post:
> http://stackoverflow.com/questions/19169992/custom-binaries-on-heroku
>
> Any ideas what I'm doing wrong?

How are you trying to call it?

Consider experimenting with "heroku run bash" to explore the built
application to see if the binary is in the right place.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Fork from app w/ Postgres Crane to different app w/ Postgres Dev

2013-10-03 Thread Daniel Farina
On Thu, Oct 3, 2013 at 2:02 PM, Bentley Cook  wrote:
> Is it not possible to go Crane->Dev? Can I only go from a paid db to a paid
> db?

Hello,

No, you cannot make this transition.  It's mostly an artifact of
implementation, and the differentiation is not 'paid', but how the
multitenancy is mechanically done.  This is a leak in the abstraction.

Given you probably are thinking there's a small amount of data
involved to want to put the stuff in a dev, you may want to consider
pgbackups:transfer as seen in the pg-extras Heroku CLI extension:
https://github.com/heroku/heroku-pg-extras.

If the implementation were somewhat smarter maybe small databases
could use that path to perform 'fork' automatically, but that is not
the here and now.

Hope this helps you along in the meanwhile, though.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Heroku dyno crashes after buildpack installation

2013-09-15 Thread Daniel Farina
On Sat, Sep 14, 2013 at 8:20 PM, Kannu Mehta  wrote:
> My rails app doesn't function properly when I install a new new buildpack.
> When I run 'heroku ps', it shows that the dyno crashed.
>
> Here are my Heroku logs:
>
> /usr/local/lib/ruby/1.9.1/rubygems.rb:328:in bin_path': can't find gem
> bundler (>= 0)   (Gem::GemNotFoundException)
> from :199:inmethod_missing'
> 2013-09-14T17:54:40.029673+00:00 app[web.1]: from /app/bin/bundle:3:in `'
> 2013-09-14T17:54:41.382417+00:00 heroku[web.1]: Process exited with status 1
> 2013-09-14T17:54:41.393537+00:00 heroku[web.1]: State changed from starting
> to crashed
>
> My suspicion: I think the environment variables are being overwritten after
> installing the buildpack. This is confirmed when I compared the $PATH
> variable before and after installing the buildpack. I tried to set the
> $PATH, $GEM_PATH manually (using config:set) but no success yet. I doubt if
> there are some other variables which are being over written too. The
> buildpack I'm trying to install is or heroku config:
>
> BUILDPACK_URL: git://github.com/kannumehta/heroku-buildpack-tex.git
> GEM_PATH: vendor/bundle/ruby/2.0.0:/app/vendor/bundle/ruby/2.0.0
> PATH:/app/bin:/app/vendor/bundle/ruby/2.0.0/bin:/usr/local/bin:/usr/bin:/bin:/app/.texlive/bin/x86_64-linux:/usr/local/bin:/usr/bin:/bin

I fished around in https://github.com/kannumehta/heroku-buildpack-tex
a bit, and it looks like it depends on the multi-buildpack build pack,
but the BUILDPACK_URL looks like it's referring to the tex build pack
directly, rather than composing it with the ruby build pack.

You may want to do as the heroku-buildpack-tex README recommends and
fill in the tex buildpack url and the ruby buildpack in .buildpacks,
achieving the following results inside of "$ heroku run bash":

$ heroku run bash -a myapp

$ printenv BUILDPACK_URL
https://github.com/ddollar/heroku-buildpack-multi.git

$ cat .buildpacks
https://github.com/kannumehta/heroku-buildpack-tex.git
https://github.com/heroku/heroku-buildpack-ruby

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Is Websockets support coming?

2013-09-10 Thread Daniel Farina
On Tue, Sep 10, 2013 at 7:26 AM, Martin Saint-Macary
 wrote:
> Same here, node and socket.io.
>
> Any update on the roadmap? :-)

To wit, what Matt already wrote is still accurate.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: By what means does the Heroku Toolbelt update my PATH?

2013-09-08 Thread Daniel Farina
On Sun, Sep 8, 2013 at 3:06 PM, ebdb  wrote:
> I just installed the Heroku Toolbelt from here...
>
> 
>
> At the bottom of the page it says...
>
> Technical details
>
> The heroku command line client will be installed into /usr/local/heroku and
> /usr/local/heroku/bin will be added to your PATH.
>
> I'm wondering how that all gets set up.
> [...]
> Where did the installer make changes?

What platform; e.g. Mac, Linux, Windows...

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: dyno networking multile ports

2013-08-27 Thread Daniel Farina
On Wed, Aug 7, 2013 at 2:00 AM, zka  wrote:
> Hi,
>
> As describe here :
> https://blog.heroku.com/archives/2013/5/2/new_dyno_networking_model
>
>> The new dyno networking model brings us closer to that goal: The dyno no
>> longer imposes any restrictions on what ports an application can listen on.
>> This improves out-of-the box compatibility with application frameworks that
>> listen on multiple ports (for whatever reason). You can still only connect
>> from the outside world to the port specified in the $PORT environment
>> variable, but now you don't have to painfully reconfigure your web stack to
>> stop it from listening on other ports. In other words, if it worked on your
>> local environment, there is now one less reason it might break on Heroku.
>
>
>
> I test to deploy an app listening on port 9000, and fail to access it :
>
> http://pure-island-8483.herokuapp.com:9000
>
> How can i make it work ?

Those ports per the blog are not open to the outside world (save
$PORT, which is routed), rather, the use case that is designed for is
to allow cross-process communication within exactly one dyno (read:
"container") without port clashing with unrelated neighbors.  It
probably could have been better explained.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Error on SSH when creating a new Heroku app from template in Eclipse

2013-08-27 Thread Daniel Farina
On Fri, Aug 23, 2013 at 8:15 PM, Ian Christopher de Jesus
 wrote:
> I followed the instructions in
> https://devcenter.heroku.com/articles/getting-started-with-heroku-eclipse,
> however, I get this error message.
>
>> We have encountered a problem creating your application:
>> arcane-citadel-9718. This could be due to the Eclipse SSH key is not
>> matching the SSH key(s) that is associated with your Heroku account. To fix
>> this error, you can: - Associate your SSH key to your Heroku account by
>> going to "Preferences" OR - If the SSH Key is correct, restart Eclipse.
>> g...@heroku.com:arcane-citadel-9718.git: reject HostKey: heroku.com
>
>
> I see my app, when I go to herokuapps.com so that I means I have
> successfully deployed my application. I have used the same SSH keys that I
> use when I do
>
>> git push heroku master
>
>
> in the CLI. Any help to fix this matter is truly appreciated.

Is it possible you deployed your application once from the old keys
and then a minor error crept into the matching Eclipse configuration
of the keys?  Have you since figured this out?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: css not loading properly !

2013-07-21 Thread Daniel Farina
On Sun, Jul 21, 2013 at 2:34 PM, Manikanta Kondeti
 wrote:
>> CSS not  loading properly ! Tell me where I'm wrong , Plz ! Here is the
>> link ! and see the diff how t is working in my system & in heroku , why is
>> it like that ??
>> http://web.iiit.ac.in/~kondetimanikanta.purushotham/project1/bk1.php
>> ,, https://stark-reef-3839.herokuapp.com/

You might want to try this alternative PHP build pack, which expands
on the Heroku version, and seems better documented.

https://github.com/CHH/heroku-buildpack-php

You'll want to pay attention tho the 'document-root' setting, although
the default may suffice.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Configuration of Django on Heroku with Python 3.3.2 - Error installing wsgiref

2013-07-18 Thread Daniel Farina
On Thu, Jul 18, 2013 at 6:00 AM, J.P. Fortier  wrote:
> Hi again
>
> As I delve into 2.7 Heroku setup, I see the instructions here require
> gunicorn:
> https://devcenter.heroku.com/articles/django
>
> Is this at all possible under Windows? (no gunicorn for windows)
> If not, are there tutorials for a Heroku/Django windows configuration?

Oh, quite interesting...gunicorn is probably among the preferred
deployment, but is not ported to Windows.  It seems a hassle to try to
maintain a different Windows and *NIX (as on Heroku), so perhaps try
'gevent', which appears to be portable.  Or, just stick with wsgiref
to get started.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Configuration of Django on Heroku with Python 3.3.2 - Error installing wsgiref

2013-07-17 Thread Daniel Farina
On Wed, Jul 17, 2013 at 6:55 AM, J.P. Fortier  wrote:
> Hi Daniel
>
> This is the component I'm trying to install via pip:
> https://pypi.python.org/pypi/django-toolbelt/0.0.1

Ah, a third party library named in much the same way.  My mistake.

> This is on my local system, trying to configure my local codebase for
> deployment to Heroku. I'm not within the Heroku environment yet.
> (I'm following the steps and prerequisites listed on the deventer.heroku.com
> article)
>
> I downloaded python 3.3.2 and set it up locally. I'll switch to 2.7.5, seems
> like the safer choice.
> Thanks!

Yeah, quite a few libraries are still not Python3 compatible...we may
have yet a few more years before that'll happen, on top of the half
decade that has already elapsed.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Configuration of Django on Heroku with Python 3.3.2 - Error installing wsgiref

2013-07-16 Thread Daniel Farina
On Tue, Jul 16, 2013 at 3:25 PM, Daniel Farina  wrote:
>> It installs the various components OK except for dj-static. It relies on
>> wsgiref v. 0.1.2.
>> From what I'm seeing, the latest version of wsgiref is not compatible with
>> Python 3.3.2 (with Django 1.5.1). (use of 'print' as a statement instead of
>> as a function, specifically)
>
> You probably want to use Python2 if libraries you depend on don't
> support Python3.  You can set a preferred Python runtime in
> 'runtime.txt', as seen here:
> https://devcenter.heroku.com/articles/python-runtimes

Come to think of it, I'm a little surprised that without tweaking
runtime.txt that one would use wind up getting Python3 to begin with.
Is it possible that your *local* operating system (rather than Heroku)
is the one exhibiting this problem?  If so, what system, how did you
get a copy of Python, if at all, and at what step in the
documentation?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Configuration of Django on Heroku with Python 3.3.2 - Error installing wsgiref

2013-07-16 Thread Daniel Farina
On Mon, Jul 15, 2013 at 12:09 PM, J.P. Fortier  wrote:
> I've been following through the instructions in the follow Heroku article
> and I'm stuck on installing the django-toolbelt:

There is no django toolbelt, it's the "Heroku Toolbelt," unaffiliated
with the Django project.  It is a CLI for manipulating Heroku
resources.

> https://devcenter.heroku.com/articles/django
>
> It installs the various components OK except for dj-static. It relies on
> wsgiref v. 0.1.2.
> From what I'm seeing, the latest version of wsgiref is not compatible with
> Python 3.3.2 (with Django 1.5.1). (use of 'print' as a statement instead of
> as a function, specifically)

You probably want to use Python2 if libraries you depend on don't
support Python3.  You can set a preferred Python runtime in
'runtime.txt', as seen here:
https://devcenter.heroku.com/articles/python-runtimes

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Reg : Executing System Calls on heroku

2013-07-16 Thread Daniel Farina
On Mon, Jul 15, 2013 at 3:26 PM, Manikanta Kondeti
 wrote:
> Ok , let me explain you  this way , my app is working fine  , I can run that
> python file on terminal and its working  , the problem is I'm not able to
> execute it from php file .

You may need an absolute path, e.g. /usr/local/bin/python.

Otherwise, without an error message or more information there's not
much to do about diagnosis.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Reg : Executing System Calls on heroku

2013-07-15 Thread Daniel Farina
On Mon, Jul 15, 2013 at 3:21 PM, Manikanta Kondeti
 wrote:
> Sorry  , I'm not able to run bash I'm getting this error .

That's because *I* ran those steps, taking the app name.  I did delete
it now, though.  You can use any application name to test what a
non-buildpacked app has in the container.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Reg : Executing System Calls on heroku

2013-07-15 Thread Daniel Farina
On Mon, Jul 15, 2013 at 3:01 PM, Peter van Hardenberg  wrote:
> Hi Manikanta,
>
> by default, the Heroku Cedar environment is very minimalist. It includes
> almost no packages, including, I think(?), no Python.

False.  Python is there.

$ heroku create -a has-no-buildpack-whatsoever
Creating has-no-buildpack-whatsoever... done, region is us
http://has-no-buildpack-whatsoever.herokuapp.com/ |
g...@heroku.com:has-no-buildpack-whatsoever.git

$ heroku run bash -a has-no-buildpack-whatsoever
Running `bash` attached to terminal... up, run.5017

~ $ python
Python 2.7.2 (default, Apr 13 2013, 02:05:31)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Scaling worker dynos from the command line?

2013-07-07 Thread Daniel Farina
On Sun, Jul 7, 2013 at 7:53 PM, Andrew Lorente  wrote:
> The heroku command-line client is giving me some mixed signals!
>
> $ heroku help ps:scale
>   Usage: heroku ps:scale DYNO1=AMOUNT1 [DYNO2=AMOUNT2 ...]
>
>scale dynos by the given amount
>
>   Examples:
>
>$ heroku ps:scale web=3 worker+1
>Scaling web dynos... done, now running 3
>Scaling worker dynos... done, now running 1
>
> $ heroku ps:scale worker=1
> Scaling worker dynos... failed
>  !No such type as worker.

Well, these are but examples with common names, so it would seem
likely that your "Procfile" may be incomplete somehow.  You can see
what kind of thing is expected here:

https://devcenter.heroku.com/articles/procfile#declaring-process-types

> I also can't figure out how to scale it through the web interface :(

That may also point to a missing Procfile entry.

If a missing or anemic Procfile is the problem, it seems reasonable
both the web and CLI be expanded to help direct one's attention to
that...

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: heroku run bash behind a socks proxy

2013-07-06 Thread Daniel Farina
On Fri, Jul 5, 2013 at 3:00 AM, Brice Vandeputte  wrote:
> i didn't know the hostname(s) used in this case
> so by adding some ruby trace i show that (gems excon) socket.rb attempt to
> open a socket on an amazon instance (port 443)
>
> do you know what (socks)  ssh configuration should i set to make heroku bash
> working ? is it as simple as heroku push ?

Unfortunately for you, it uses a completely different mechanism that
relies on port 5000.  Your case is documented here:
https://devcenter.heroku.com/articles/one-off-dynos#timeout-awaiting-process.
 The general facility is called 'rendezvous'.  There's a (closed)
issue about this here https://github.com/heroku/heroku/issues/407.

So...how to make SOCKS work...hmm

Well, the problem is the rendezvous endpoint is dynamic and hard to
configure beforehand, AFAIK.  If you see this code in the CLI:

https://github.com/heroku/heroku/blob/68a0734e19e42427d90e38141492ef14360aa308/lib/heroku/command/run.rb#L109-L120

The client connects to the Heroku api, asks for an attached process,
and in the response includes its rendezvous URL.  The second step is
to connect to that URL for rendezvous.  So, to make it work with
SOCKS, I surmise one would have to deftly map a new SOCKS route right
between these two steps.  Not easy, but I think that's probably what
would have to happen right now.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: App is live but I can't open a django shell or run any one off command (R99, R13)

2013-07-06 Thread Daniel Farina
On Sat, Jul 6, 2013 at 4:29 AM, julienb  wrote:
> Hi,
>
> I'd like to open a django shell but received the following error in the
> console
> ! Error connecting to process
>
> Here are the logs for it:
> 2013-07-06T10:43:56.200154+00:00 heroku[api]: Starting process with command
> `python manage.py shell` by myusern...@gmail.com
> 2013-07-06T10:44:07.632417+00:00 heroku[run.3605]: Awaiting client
> 2013-07-06T10:44:17.652587+00:00 heroku[run.3605]: Error R99 (Platform
> error) -> Failed to launch the dyno within 10 seconds

H99s are, to wit, always a platform defect, and never a defect of
one's program.  They do crop up now and then, but if you see them
frequently it seems like good grounds for some complaining.

So, waiting a bit and retrying is probably the best overall
workaround.  Extended occurrences of H99 can also instigate a Heroku
status update, in the vein of 'failing to launch new processes'.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Ran ok the first 5 days, my 'celery beat' worker is not firing periodic tasks anymore

2013-06-25 Thread Daniel Farina
On Tue, Jun 25, 2013 at 2:24 AM, julien boucher  wrote:
> Thanks for the pointer Daniel, appreciated!
>
> I do not understand why it worked for 5 days with no problem and failed
> since I started and desactivated a web server.

I think that's because you may be running one web dyno and then the
application went to sleep.

After reviewing
https://devcenter.heroku.com/articles/dynos#dyno-sleeping I'm left
scratching my head because it says "worker dynos never sleep".  If you
do 'heroku ps' does the worker claim to be 'idle'?

On the other hand, there's an admonition on the right saying that one
needs two web dynos for the application to not sleep, which conflicts
with the last sentence.  Looks like a bug in the documentation.  My
guess is the admonition is right and the last sentence is wrong, if
your case is any indication.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Ran ok the first 5 days, my 'celery beat' worker is not firing periodic tasks anymore

2013-06-25 Thread Daniel Farina
On Tue, Jun 25, 2013 at 1:45 AM, julien boucher  wrote:
> I deployed an app with a set of periodic tasks a week ago.
> Everything went fine for a week - using heroku free instance as a worker
> dyno (no web server active).
>
> Yesterday afternoon,  I started the web server for 10 minutes and shut it
> down in the Heroku interface.
> Since then it seems the worker is idling and it is not sending any periodic
> task anymore.

Well, if the worker is idle then it's not alive enough check the
system clock to start processing jobs again/triggering invocations.

If you have a fairly loose latency requirements and can't use all the
resources of one dyno all the time, I suggest using the scheduler
addon to process trigger work every ten minutes or so:

  https://addons.heroku.com/scheduler

This way, if there's no work to do the job will just exit more or less
right away, incurring the billing of a trivial number of
dyno-hours/seconds.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: need help with identifying cause

2013-06-17 Thread Daniel Farina
On Mon, Jun 17, 2013 at 1:26 PM, Daniel Farina  wrote:
> Hello,
>
> Heroku does make affordance for persistent files: dyno restarts will lose all 
> files.  You can, however, use temporary files in /tmp to manipulate things 
> and then upload them somewhere else, like S3.

And by 'does' I mean "doesn't".  Mea culpa.  The rest reads accurately.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: need help with identifying cause

2013-06-17 Thread Daniel Farina
On Thu, Jun 13, 2013 at 5:36 AM,   wrote:
> I've been trying to make my app work on Heroku without using external file
> server / postgresql YET
>
> currently stuck on debugging an issue with the final part of my
application
>
> I've diagnosed it to the two most obvious problem and require advice for
> making it work
>
>
> The first part of the application allows user to select, drag and resize
> images while the second part compiles all of the images into a single
image
> for other uses
>
> the problem now is with the compiling part which works locally but not on
> Heroku (file server? sorry, newbie to web app development)
>
> and through several testing I think it is either :
>
> 1) Compilation of image was done through PHP, GD library to be specific
and
> i've checked the phpinfo but it looks like it DOES support PHP GD library
> (not sure)
>
> 2) Heroku does not allow the php to write onto file server but I've tried
> several ways but I am not very sure how to do it without writing onto file
> server
>
> please advise !

Hello,

Heroku does make affordance for persistent files: dyno restarts will lose
all files.  You can, however, use temporary files in /tmp to manipulate
things and then upload them somewhere else, like S3.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Detecting R14 errors before they happen - oink gem not possible

2013-06-13 Thread Daniel Farina
On Thu, Jun 13, 2013 at 5:57 AM, Daniel Doubrovkine  wrote:
> Having gone that path, we eventually gave up. Any high resolution image
> cannot be processed with ImageMagick without 2-4GB of RAM. We now run our
> workers on EC2, documented in
> http://artsy.github.io/blog/2012/01/31/beyond-heroku-satellite-delayed-job-workers-on-ec2/.

True.  It's like 2X dynos, but more so...some problems are just vastly
more efficient in coarser grained chunks that Heroku doesn't provide as-is.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Detecting R14 errors before they happen - oink gem not possible

2013-06-13 Thread Daniel Farina
On Thu, Jun 13, 2013 at 2:03 AM, Josal  wrote:
> What I plan is to stop the process and flag it as "pending" in my
> backoffice, making the process manually later in my machine as an exception.
>
> I've used 2X dynos, but all the memory available is used and R14 errors also
> are thrown. Imagemagick works this way, with much memory. I've limited
> delegating to disk cache instead of memory cache
> (http://www.imagemagick.org/script/command-line-options.php#limit, suggested
> in some places, example here:
> http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=23090), but
> no changes.

Tricky.  Nominally this is what Linux cgroups was invented to help
with, but I think the amount of power delegated to non-root users (and
thus, on Heroku) is minimal.

Here are two options that come to mind:

1) Somehow delegate these possibly expensive processes to their own 2X
dyno, taking the computation out-of-band.  e.g., a queuing strategy,
multi-app delegation (one app posting to another), or the Heroku API
(be careful with that latter one, as it's basically automated "spend
money", and one can hit api limits, also, the control plane has worse
availability than standing-processes...but it has upsides, like burst
capacity and 0-cost when there's nothing to do)

2) Use /proc/[self|pid]/statm or /proc/[self|pid]/status (which has
similar information, but is more human-targeted) to inspect the RSS
size of a process over time to take control over over-bloated
processes.  A process could watch itself grow in this way, which would
be useful if it can do it semi-frequently enough to write a "too big,
can't do" record and give up.

If one uses /proc/pid/statm, be aware one will have to multiply by the
system page size, which has been 4096 bytes for years but *could*
change any time, so consider 'getconf PAGESIZE' to pick up the
multiplier.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Detecting R14 errors before they happen - oink gem not possible

2013-06-13 Thread Daniel Farina
On Thu, Jun 13, 2013 at 1:27 AM, Josal  wrote:
> Hi,
>
> I have a problem with R14 errors.
>
> I run a process in a worker dyno. It converts a list of images to a single
> pdf with imagemagick. It's well known that this tool uses a lot of memory.
> I'm currently making a syscall directly because it seems it works better
> than rmagick gem regarding the R14 errors. I can provide more details on
> this as I've tried many options here, limiting the memory, even talking with
> heroku support, etc
> (http://stackoverflow.com/questions/16918845/almost-solved-heroku-worker-dyno-giving-r14-errors-problems-with-memory-mana)
>
> Eventually, the process throws R14 errors depending on the file I'm
> processing and also depending on the context (because it doesn't throw the
> errors always with the same files).
>
> At the end, the files are sucessfully generated even with R14 errors. But I
> guess it's not a very stable situation for my production app.

Yeah, one is running close to the edge.  It's good you saw the warning.

> I want to detect the R14 errors before they happen. I know oink gem but the
> situation is that I cannot call any method while the syscall is running. The
> R14 errors appear while the syscall is running. How can I predetect them in
> execution time? Something like a wrapper for this syscall which monitors the
> use of memory and throws a controlled exception if the memory usage is
> exceeded? Like Timeout::timeout but related to memory instead of time? :-s

You can monitor memory usage in /proc, but what were you planning to
do, exactly?  Crash the Dyno? Because that's what would eventually end
up happening.  I suppose some some finesse you could try to abort very
specific bad jobs.

Have you considered use of 2x dynos?  They cost twice as much, but
ofttimes one only needs half as many, or even less on account of some
of the efficiency benefits of more monolithic computation.  It may
give your program more breathing room.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: node and file upload

2013-06-10 Thread Daniel Farina
On Mon, Jun 10, 2013 at 2:34 PM, Albert Chou  wrote:
> Alternatively, implement direct upload to S3 (see
> https://devcenter.heroku.com/articles/s3 ).  There are also SaaS providers
> that make it easy (but of course charge for the service).

In addendum, sometimes the streaming nature of such uploads can prove
a problem, but one can use multi-part upload to assuage the issue
somewhat.  The only piece of software I know of (although I not gone
through a great cataloging effort) that implements this is
https://github.com/kr/s3 and its s3cp utility.

You may want to do the direct upload anyway to avoid tying up so many
application resources, though, if you can.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Session Affinity and WebSockets Support

2013-06-05 Thread Daniel Farina
On Wed, Jun 5, 2013 at 4:34 PM, Erich Rusch  wrote:
> 1) WebSockets - Definitely seems like a need long term. Are you planning on
> supporting WebSockets?

I think someone would probably pick up the project eventually.  I
think several people have approached it speculatively.  That'll
probably continue.  Maybe someone is noodling it right now, even: it
comes up somewhat regularly in conversation, so it's in the gestalt
collection of active interests.

> 2) Session Affinity - Will Heroku ever support session affinity?

Please do say more.  I take your general meaning, but I'm curious
about the specifics.   Also, ever is a long time.

> Thoughts or estimates on if/when these will be implemented?

In general, most staff are reluctant to give estimates unless they are
couched in the most speculative of expectations.  Too much experience
suggests that piercing the veil of the future to figure out when and
even if an approach will pan out is more than a little hazardous to
remotely accurate estimation.

So, no.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Deploy django/python app to heroku & use postgres db

2013-06-03 Thread Daniel Farina
On Mon, Jun 3, 2013 at 2:27 PM, maneesha sane  wrote:
> Thanks.
> This part :
>
> 
>> When I run heroku run python manage.py sqlall books I get this message:
>>
>> CommandError: App with label books could not be found. Are you sure your
>> INSTALLED_APPS setting is correct?
>
> You might need to fix this before continuing, otherwise, if memory
> serves, Django will not synchronize the models.
> -
>
> is still where I am getting stuck.  My INSTALLED_APPS setting is correct yet
> I keep getting this error.  I can't think of what else might make this error
> come up.  So yes, I do need to fix this, but have no idea how.

Did you push an updated version of your code?  You can verify what the
file has in it by doing something like:

$ heroku run bash -a your-app

And then you can use tools like:

$ cat my/file

> (and at the end where I showed my db settings I changed a few characters in
> the password.  I wouldn't post something with a real password... just wanted
> to show output that looked like the real output.)

It's easy to make this mistake.  It didn't look like a regular
Heroku-assigned password, but I thought better safe than sorry.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Problem adding memcache addon

2013-06-03 Thread Daniel Farina
On Wed, May 29, 2013 at 2:58 PM, Daniel Doubrovkine  wrote:
> Can we please have an update from Heroku on whether we need to migrate to
> someone else's addon ASAP, too, before the addon decides to stop responding
> to memcache read/writes? :)

I should have written more precisely: the addon (clearly) not taking
more business.  That's not the unambiguously the same as ceasing
operation.  I think the best answer about how long Northscale's staff
intend to serve the current customer base is probably best directed to
them: maybe it's even indefinite, I have no idea.  I think in most
cases where there's a known timeline to deprecation, there would be
communication with the addon customers, so for all I know there may be
no gelled plan.

My advice: ask Northscale/Couchbase.

As of right now, it looks like MemCachier and IronCache are in the
catalog and mention memcache somehow:
https://addons.heroku.com/?q=memcache.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Deploy django/python app to heroku & use postgres db

2013-06-03 Thread Daniel Farina
On Sat, Jun 1, 2013 at 4:37 PM, maneesha sane  wrote:
> When I run python manage.py syncdb I get the expected output (Creating
> Tables, Installing Indexes, etc) However, the tables are not created in my
> heroku database. They are created in another local postgres database called
> 'shows' which is not connected to this project or app. It's a dummy database
> I created earlier just while I was exploring how things work. I have no idea
> why this project is looking for the database 'shows'. So then I dropped that
> db from postgres and now I get this message when I try to run python
> manage.py syncdb:
>
> OperationalError: FATAL:  database "shows" does not exist
>
> So then instead of running just python I thought of trying heroku run
> python.

This is the common recommended way (because it gets your environment
on Heroku automatically).

Often, setting the environment locally to do maintenance is error
prone and not really necessary, although it's entirely doable and can
be made safe with care.

> When I run heroku run python manage.py sqlall books I get this message:
>
> CommandError: App with label books could not be found. Are you sure your
> INSTALLED_APPS setting is correct?

You might need to fix this before continuing, otherwise, if memory
serves, Django will not synchronize the models.

> When I run heroku run python manage.py syncdb I get this output:
>
> Running `python manage.py syncdb` attached to terminal... up, run.7207
> Creating tables ...
> Installing custom SQL ...
> Installing indexes ...
> Installed 0 object(s) from 0 fixture(s)
>
> But when I go into the db shell with
>
> heroku pg:psql HEROKU_POSTGRESQL_GREEN
>
> or
>
> heroku pg:psql DATABASE_URL
>
> or
>
> heroku pg:psql HEROKU_POSTGRESQL_GREEN_URL
>
> and look for all tables (using \dt) the tables from my books model are not
> there. I have no idea what database they are being created in.

One does not nominally have control over CREATE DATABASE on Heroku, so
the one database credential you are getting is the right one.

> I have been reading the docs that explain that heroku run is for one-off
> processes, but I admit I'm still not really sure what that means and how it
> is different from just running python.

In a nutshell, 'heroku run' passes the subsequent arguments to a
freshly created Dyno (which is a lxc-styled Linux container) and then
attaches its terminal output to your terminal, and vice versa.
Keystrokes are sent directly to the other side, and then the resultant
change on the terminal is rendered after that round-trip to Heroku.

They're called one-shot because the process manager makes no attempt
to keep a target number of those processes alive should they
terminate, unlike "heroku ps:scale web=3", where the number of 'web'
processes is made to equal '3' as often as possible, such as after one
of them exits or its corresponding hardware suddenly disappears.

 from django.conf import settings
 print settings.DATABASES['default']
> {'PASSWORD': 'OMR7r_d1tKVSa-NFfXI_FqYn2i', 'TEST_CHARSET': None, 'PORT':
> 5432, 'HOST': 'ec2-54-227-252-82.compute-1.amazonaws.com', 'OPTIONS': {},
> 'TIME_ZONE': 'UTC', 'ENGINE': 'django.db.backends.postgresql_psycopg2',
> 'TEST_NAME': None, 'NAME': 'd3ukewj9guulmo3', 'TEST_MIRROR': None, 'USER':
> 'sndetajgwxlayz', 'TEST_COLLATION': None}

This contains a password :( you should probably rotate it with 'heroku
pg:credentials --reset'.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Out of Memory Errors on Simple Queries that Worked Previously

2013-05-29 Thread Daniel Farina
On Wed, May 29, 2013 at 11:47 PM, Jack Royal-Gordon  wrote:
> Tonight, I started getting "out of memory" errors from several different 
> queries, many of which are simple, and all of which have worked well in the 
> past.  For example, a simple "select" across several hundred rows that should 
> produce 20 rows or less gets this error.  App has not been touched in several 
> days, the queries in question have been running regularly for months.  The 
> database is 9.2, upgraded from 9.1 last week, and all queries have run 
> successfully since the database was upgraded.
>
> My thought is that the database server needs to be stopped and restarted, but 
> I don't know how to do that on Heroku.  Any ideas?

This one might be best for a support ticket.  There are several
possible causes, but they will likely require closer investigation and
exchange of details that are probably not best done via public list.
Please reference this thread (link:
https://groups.google.com/forum/?fromgroups#!topic/heroku/4qxst42Bq9Q)
and mention that I requested you do that.

Unless one has started leaking connections, it's reasonably unlikely
that this change is intrinsically 9.2 related.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Problem adding memcache addon

2013-05-29 Thread Daniel Farina
On Wed, May 29, 2013 at 2:48 PM,   wrote:
> Hello,
>
> I am attempting to add memcache to my heroku app, and I received the
> following error:
>
> "The memcache add-on has been disabled. Please choose an alternative service
> at https://addons.heroku.com/#caching";
>
> I don't see any information on the heroku site about this change, nor are
> there any google results for the error. If the memcache add-on is indeed no
> longer available, I'll look into memcachier, but if I'm receiving this error
> because of a mistake on my part, I'd like to correct it to get memache
> running.

Yup, it's no longer available.  That add-on decided to cease its
operation.  One will have to go elsewhere for their memcache hosting
needs.

Looks like there is some out of date documentation, though:

  https://devcenter.heroku.com/articles/memcache

That documentation seems to be maintained by Couchbase, which is the
aforementioned party that deprecated the addon, so Heroku may want to
be looped in as to possibly salvage parts of the document that are
still useful but stop it from indicating that the memcache addon is
still available.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ArgumentError when starting Unicorn on Heroku

2013-05-25 Thread Daniel Farina
On Sat, May 25, 2013 at 2:33 AM, Jack Royal-Gordon  wrote:
> Switched my RoR (3.1.3, 1.9.2, Cedar Platform) app from Thin to Unicorn 
> (4.6.2).  It ran fine in development (Mac OSX), but when deploying to 
> production on Heroku, it fails with the following messages:
>
> Starting process with command `bundle exec unicorn start -p 6069 -c 
> ./config/unicorn.rb`
>   
> /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/configurator.rb:634:in
>  `parse_rackup_file': rackup file (start) not readable (ArgumentError)
>   from 
> /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/configurator.rb:77:in
>  `reload'
>   from 
> /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/configurator.rb:68:in
>  `initialize'
>   from 
> /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:108:in
>  `new'
>   from 
> /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:108:in
>  `initialize'
>   from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/bin/unicorn:126:in 
> `new'
>   from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/bin/unicorn:126:in 
> `'
>   from /app/vendor/bundle/ruby/1.9.1/bin/unicorn:19:in `load'
>   from /app/vendor/bundle/ruby/1.9.1/bin/unicorn:19:in `'
> Process exited with status 1
> State changed from starting to crashed
>
> config.ru:
> require ::File.expand_path('../config/environment',  __FILE__)
> run NoveltyStats::Application
>
>
> Procfile:
> web: bundle exec unicorn start -p $PORT -c ./config/unicorn.rb
> sidekiq: bundle exec sidekiq -c 10
>
> unicorn.rb:
> worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3)
> timeout 15
> preload_app true
>
> before_fork do |server, worker|
>
>   Signal.trap 'TERM' do
> puts 'Unicorn master intercepting TERM and sending myself QUIT 
> instead'
> Process.kill 'QUIT', Process.pid
>   end
>
>   defined?(ActiveRecord::Base) and
> ActiveRecord::Base.connection.disconnect!
> end
>
> after_fork do |server, worker|
>
>   Signal.trap 'TERM' do
> puts 'Unicorn worker intercepting TERM and doing nothing. Wait for 
> master to sent QUIT'
>   end
>
>   defined?(ActiveRecord::Base) and
> ActiveRecord::Base.establish_connection
> end
>
> I have no idea where to even begin to troubleshoot this problem.  Any 
> thoughts?

Well that sounds pretty bizarre.  The way I'd go about solving this
would be to us 'heroku run bash' and start poking around.  Although
the error message you see above can have multiple causes (says the
web, I just ran some searching), the gist of your problem sounds like
it could have to do with paths that may be different between Heroku
and your personal computer (although there can be numerous other
causes).

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Really uneven dyno performance

2013-05-21 Thread Daniel Farina
On Tue, May 14, 2013 at 11:34 PM, Jack Oekaki  wrote:
> Has anyone else experienced severe fluctuations in the execution speed
> of your dynos? I have a largely CPU-bound app that (AFAIK) does a
> fairly consistent amount of work per request (very very few ultra long
> requests, ala Rap Genius), yet I've seen average request times vary by
> as much as 5x from hour to hour even though the level of traffic is
> steady and even though the mix of requests is unchanged.
>
> I've been assuming that it's my fault; a bottleneck in something I
> haven't been able to measure or something. I'm using New Relic, but
> all the external services seem unaffected and the performance drop
> seems uniformly distributed throughout all the profiling segments.
>
> The thing that's prompted me to ask is that I've recently had a day
> long stint where everything ran like crap. Usually it's fleeting. May
> 12th 2000hrs UTC till May 13th 2400hrs had lag spikes around every 5
> minutes and timeouts all over the place. I've got to get to the bottom
> of this. So, what's average for heroku?

That week I've noticed quite a bit of strange network activity (which
doesn't fit your CPU assessment, but aforementioned brief total stalls
mirror some other symptoms).

So, my main question is: has this abated, or does it continue?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Logs seem awfully big

2013-05-17 Thread Daniel Farina
On Thu, May 16, 2013 at 11:25 PM, Jack Royal-Gordon  wrote:
> I'm using LogEntries to store my sys logs, but I'm apparently generating a 
> very large log volume (~87GB/~270M events per day).  My app has relatively 
> few users (100) who use it very lightly (16,665 HTTP Requests per day).  The 
> main cause seems to be that my inserts can be very large (including web pages 
> that I have scraped), and when they are logged it includes the entire 
> contents of the web page (over 1000 lines per insert, 25,000 inserts into the 
> web page table per day).  I have asked Heroku about any of the following:
>
> 1) Shorten the logging entry from Postgres inserts to truncate the field 
> listings
> 2) Disable the logging of long-running Heroku commands
>
> The response I got is that none of these is possible, and yet LogEntries 
> Support tells me that they had another user in the past who was able to get 
> Heroku to stop logging from their Postgres database.

The problem of log verbosity has been without satisfactory resolution
for some time.  Sorry about that.

As for disabling logs: depending on the phase of the moon, a member of
the engineering staff servicing a support request might opt to tweak
logging settings on an experimental basis, with a slew of caveats.
However, those cases are generally left to individual discretion: it's
not a feature of the service.

> Does anyone know how to accomplish one of these tweaks?

On 9.2, truncation or drops of logs do happen at 10KB, which may or
may not prove to truncate in your case.  It also supports multi-line
queries without log record fragmentation, so one will receive one log
records with literal newlines in it (in this aspect, logplex is more
expressive than syslog), so it will not produce one log record per
line, rather, it will produce one log record per query.  I'm going to
guess this will make some logging support software work a lot better
(since they typically can't deal with Postgres' fragmentation) or
worse (if they choke on literal newlines in the output).  I haven't
heard any bug reports either way, so if you feel inclined to relate
your experiences, I'd like to read about them.

For large INSERTs, you can also use COPY, which is recommended for
bulk loading.  It does not consider the contents being loaded as query
text to be logged, unlike INSERT; only the COPY statement itself will
be logged, so you'd likely get 25,000 log records a day in the above
case.

COPY's documentation is here:
http://www.postgresql.org/docs/9.2/static/sql-copy.html

Many drivers implement support for it:

(libpq-based)
Ruby pg: http://deveiate.org/code/pg/PG/Connection.html#method-i-put_copy_data
Python psycopg2: http://initd.org/psycopg/docs/cursor.html#cursor.copy_from

(Java)
JDBC: 
http://jdbc.postgresql.org/documentation/publicapi/org/postgresql/copy/CopyManager.html

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Chinese firewall - connection to heroku from China

2013-05-10 Thread Daniel Farina
On Fri, May 10, 2013 at 1:37 AM,   wrote:
> 50% of time website hosted at heroku cannot be loaded. Is there any
> solutions for users in China?

I suppose by "Chinese firewall" you are referring to the famous one
operated by the national authorities.  If that is the case, then there
is no solution to this problem that is within Heroku's purview at this
time, as far as I know.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Problem deploying Nodejs apps to Heroku as production

2013-05-07 Thread Daniel Farina
On Tue, May 7, 2013 at 7:24 PM, Tam Nguyen  wrote:
> Oh man, this is going to take a few minutes for me to take in. I'll try this
> first thing tomorrow. Thank you!

I think that's because it's more complex in the abstract than the
concrete.  I probably didn't do a good job of explaining it either.
Mechanically, I think all it means is you are going to want to look at
some one config variable when starting a program, enter a switch
statement, and then do one of several possible different entry points
depending on that config variable's value, which will vary across each
Heroku application you deploy to.

The whole point of that exercise is so that Procfile can be exactly
the same across all your deployments, while 'heroku config' is
different.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Problem deploying Nodejs apps to Heroku as production

2013-05-07 Thread Daniel Farina
On Tue, May 7, 2013 at 3:19 PM, Tam Nguyen  wrote:
> Yes, that sounds about right. Is that possible?

Yes, although my solution is a little gross, I think.

Naively, one could prepare two different Procfiles with different web
commands, but that's annoying because it pretty much forces you to
keep several slightly modified versions of your software, and probably
constantly rebase them.  So let's say that option is not one is
willing to accept...

To avoid that, one must use some kind of discriminator as to what app
code is running in that is not stored in the repository, and the
common place to do this is in configuration variables (e.g.
config:add).  So, one can make a wrapper script that is invoked the
same way across all apps for 'web', but interprets the environment
variables injected by the config differently.

In addition, the ps:scale state is stored out-of-line from the
application, so if you have different worker processes on different
applications, you can choose to give them different names and scale
only the workers you need.  For example: ps:scale fooworker=1
barworker=0 on one application and ps:scale fooworker=0 barworker=1 on
another. Alternatively, you could re-use the configuration variable
approach that you have to use with 'web' (since 'web' is special and
must be named as such on all applications) and have one entry in
Procfile that has the same name but executes differently depending on
the application configuration.

I realize this is a little bit abstract and probably would be well
served by an example, so let me know if you'd like me to make up a
more detailed one, or if the gist I provided so far has been enough to
point you in the right direction.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Problem deploying Nodejs apps to Heroku as production

2013-05-07 Thread Daniel Farina
On Tue, May 7, 2013 at 3:10 PM, Tam Nguyen  wrote:
> Peter,
>
> Sorry, but not sure if I understand your answer. All our apps are cooked up
> in one repo, and they reference each other. How do I go about splitting them
> up into different apps on Heroku, and how would I deploy to from the Linux
> box to Heroku? Would they have different Profile, or where would I specify
> which app to run?

Interesting.  It sounds like you want to deploy the same code/git
repository to different Heroku applications, but want to have
different entry points in your Procfile so that each app runs a
different code path.  Does that sound about right?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Heroku Postgres Performance Notes

2013-04-12 Thread Daniel Farina
On Fri, Apr 12, 2013 at 1:17 PM, Jason Joseph  wrote:
> We've been doing some hefty performance testing of the Heroku Postgres dbs
> with the help of some of the people on the data team (thank you guys!) and
> we just wanted to share some rough performance numbers that hopefully might
> help you when you're selecting a db type next time.

Thank you for doing this and compiling the results.

> Setup: We have some large ETL operations that obviously are very write heavy
> and we wanted to get an idea which db tier was best in terms
> price/performance. We're using the COPY command to move 2 million rows of
> data from one db (a zilla) to another and we wanted to get an idea of what
> the performance differences were between the tiers. The Zilla that is being
> copied from doesn't change between tests and for each new test we spin up a
> new db to make sure we are testing from a clean slate.
>
> DB Type - Time to copy in minutes
>
> Ronin - 35:04
> Fugu - 26:43
> Ika - 8:34
> Zilla - 7:22
>
> We didn't test a mecha (yet) or anything below Ronin because the COPY
> literally wouldn't complete on anything lower than that.

Wouldn't complete?  That strikes me as surprising.

Also, what was the aggregate size of the loaded data?  Figures
involving number of records processed can vary rather widely depending
on data types (some have more expensive parsing routines) and width of
the row (the aggregate size lets one move backwards to average width).

Normally, parsing routine overhead is not a big deal as compared to
I/O bottlenecks, but there are some data types where this effect is
probably measurable.

> One thing we did realize with the help of the Heroku PG team is that there
> is some serious variance in performance on newly provisioned dbs. They are
> currently hypothesizing that it is related to the nature of the dynamic disk
> space provisioning that happens as large amounts of data are inserted into a
> freshly provisioned db. We saw in many instances close to 50% slower speeds.
> Sometimes it would run normally (those are the values we listed above) but
> for example on the Ika runs, we would sometimes see it take close to ~15
> minutes to complete the copy. After some initial hiccups though we believe
> all dbs move towards there normal performance numbers listed above so just
> keep that in mind when you are provisioning a new db.

Yeah, there are perhaps two causes for this: one is that a freshly
awakened storage volume may be in some varying state of live-ness.
one of our staff did experiments not that long ago suggest the
performance stabilizes fairly rapidly, but in the first few minutes
after creation I imagine one could be extra-sensitive to those
variations.  There are the EBS-PRIOPS-variety volumes, which seem to
have been otherwise a good improvement all-around for most people.

A fix there would be to pre-warm the volumes.  Not precisely rocket
science, but to do so in a way that would play nicely with dynamic
disk addition this would decrease flexibility in tweaking the sizes of
volume to add (because the pool would have a fixed inventory
available, as such disks would take time to test) and is probably a
finicky piece of work, given our experience with using some of the
APIs involved and the way they can act strangely at the margins.

It could also be something else, of course.  But these are the
theories in play as of the moment.  It's interesting that the blunt
impact can make an 8 minute difference, on 16 minutes running: the
absolute size is the effect is larger than I would have guessed.

A way to partially eliminate some of these problems in the experiment
is to truncate-away the loaded data and try again, and seeing if
standard deviation takes a dive.  It would also be interesting to see
if the low-performing runs tend to cluster towards the first such run,
and whether the convergence tends to occur in one direction, e.g.
low-performers become high performers, or vice versa.

There is still some room for other explanations, too: for example, if
one's ETL issues a lot of queries whose processing is fast then
network round trip time could figure into this.  I surmise that's not
the case here, but it does cause a difference once in a while.

> Anyways, hope this was helpful and we would love to hear from anyone else
> doing performance testing on the PG dbs.

Me too.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Deploying to github pages from Heroku

2013-04-07 Thread Daniel Farina
On Sat, Apr 6, 2013 at 11:13 AM, David Boyer  wrote:
> Thanks for the tips.
>
> I got into bash and ran through the steps manually.  But there's still
> something really odd going on:
>
> ~/test $ export GIT_SSH="/app/bin/git_ssh.sh"
> ~/test $ git push g...@github.com:misterdai/test.git master:gh-pages --force
> error: cannot run /app/bin/git_ssh.sh: No such file or directory
> fatal: unable to fork
> ~/test $ ls /app/bin
> git_ssh.sh  node

How about "ls -l"? Did you set executable bits (chmod a+x) *and* put a
shebang/interpreter directive in the first line of the file? (e.g.
head /app/bin/git_ssh.sh's first line is "#!/bin/sh")  Finally, what
happens if you run "sh /app/bin/git_ssh.sh" (or if you use bashisms:
"bash /app/bin/git_ssh.sh")?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Sudden 3,000+ Billing without any extra usage.

2013-04-06 Thread Daniel Farina
On Sat, Apr 6, 2013 at 4:21 PM, Rafael Vidaurre  wrote:
> I'm seeing a pending payment on heroku for more than $3,000 USD. I usually
> pay less than $30 USD.
>
>
>
> Looking at the detailed information the amount doesn't sum up.

Please get in contact with support immediately.  The staff of The
Vault take correctness quite seriously, and are quite keen (and also
horrified) to hear of bugs.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Deploying to github pages from Heroku

2013-04-04 Thread Daniel Farina
On Thu, Apr 4, 2013 at 1:36 AM, David Boyer  wrote:
> Didn't get chance to try it out from home but I'm sure it's probably a
> firewall not letting me out.  If I try it on an external connection and
> still have issues I'll log it on the off chance ;)

Unfortunately I found the issue; it has been closed with, basically,
'arrrgh'...but I'd go there and register your +1 that this sucks and
it'd be nice to find some way to get around this:

  https://github.com/heroku/heroku/issues/407

> From all the variations I've tried so far it feels like the following
> happens:
>
> git commands fire off fine (git init, git add, git commit)
> git push to github starts
>
> It spots the GIT_SSH environmental variable.
> Reads it correctly.
> Can't find the file /app/git_ssh.sh error (unable to fork)
>
> It's really weird, because that file definitely exists.  It's almost seems
> like the git process spawns "sh" to run the script but it can't see the /app
> mount?  I'm grabbing at straws if that sounds daft ;)>

Well, I don't think we do anything unusual there -- perhaps you should
try stepping through it while running inside 'heroku run bash'?

I know the 'heroku run bash' to get a shell hooked up from a Heroku
container to your local TTY is old news by now, but I feel inclined to
remark that it's saved me enormous grief in debugging this kind of
thing: so before tearing one's hair out I'd strongly recommend somehow
making 'heroku run bash' happen.

Also, there is a convention of putting executable utilities into
"/app/bin", which in a local git repository is rendered as
REPO_ROOT/bin.  That shouldn't break your stuff, but I think parts of
the toolchain anticipate it...for example, $PATH in an environment
emitted from the Ruby build pack (not every buildpack does this or
needs to):

  /app/bin:/app/vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin

Doing this, you can take advantage of up things in ./bin/ in your
repository (translated to /app/bin on Heroku) being in $PATH from the
get-go, at least for Ruby.

-- 
fdr

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Deploying to github pages from Heroku

2013-04-03 Thread Daniel Farina
On Wed, Apr 3, 2013 at 8:14 AM, David Boyer  wrote:
> Does ssh.sh has execute permissions set correctly?
> Is ssh.sh sitting in a mount point with `noexec` set? (mount | grep noexec)
>
> I'll double check these when I get chance (can't seem to access bash from
> work), but in the meantime I tried setting GIT_SSH to just "ssh".  It ran it
> without an error, although github refused the push since it wasn't
> authenticated (as expected).

Interesting.  In my recollection, "heroku run" (as in "heroku run
bash") does not rely on HTTP to do the heavy lifting, unlike most of
the toolchain.  Sounds like it can't navigate a firewall.  The
relevant implementation is here:

  
https://github.com/heroku/heroku/blob/master/lib/heroku/client/rendezvous.rb#L27-L45

Although I might guess this problem may have come up before, it's a
new one to me...it's probably worth a filed issue on Github, although
I think the odds of this changing Real Soon are not vast :(

And just to double-check: are you using the Cedar stack?

> I read up and GIT_SSH isn't capable of taking command arguments, so most
> people use a .sh script.  I've managed to get rid of the permissions error
> but it now complains about not being able to find the file (/app/git_ssh.sh)
> even though I test for it's existence in the app and it's definitely there
> (also set 0755 permissions to be sure).
>
> "error: cannot run /app/git_ssh.sh: No such file or directory\nfatal: unable
> to fork\n"

Something is wrong: if executable bits didn't work in /app, then a ton
of stuff would be broken.

Here is a dump of the mount table from a fresh app for all involved, I
think eliminating the noexec suspicion:

~ $ mount
rootfs on / type rootfs (rw)
/dev/loop1 on / type ext3
(ro,nosuid,nodev,noatime,nodiratime,errors=continue,data=writeback)
/dev/sda2 on /app type ext3
(rw,nosuid,nodev,relatime,errors=continue,data=writeback)
/dev/sda2 on /tmp type ext3
(rw,nosuid,nodev,relatime,errors=continue,data=writeback)
/dev/sda2 on /var/tmp type ext3
(rw,nosuid,nodev,relatime,errors=continue,data=writeback)
none on /proc type proc (rw,relatime)
none on /dev type devtmpfs
(rw,relatime,size=17364800k,nr_inodes=4341200,mode=755)
none on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
none on /dev/shm type tmpfs
(rw,nosuid,nodev,relatime,size=5120k,nr_inodes=1024,mode=700,uid=55751,gid=55751)
none on /dev/console type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/sda2 on /etc/passwd type ext3
(rw,nosuid,nodev,relatime,errors=continue,data=writeback)
/dev/sda2 on /etc/hostname type ext3
(rw,nosuid,nodev,relatime,errors=continue,data=writeback)
/dev/sda2 on /etc/hosts type ext3
(rw,nosuid,nodev,relatime,errors=continue,data=writeback)
/dev/sda2 on /etc/profile type ext3
(rw,nosuid,nodev,relatime,errors=continue,data=writeback)
/dev/sda2 on /etc/bash.bashrc type ext3
(rw,nosuid,nodev,relatime,errors=continue,data=writeback)
/dev/sda1 on /etc/resolv.conf type ext3
(rw,relatime,errors=continue,data=writeback)

--
fdr

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Deploying to github pages from Heroku

2013-04-03 Thread Daniel Farina
Hello,

On Wed, Apr 3, 2013 at 1:11 AM, David Boyer  wrote:
> Looks like the ephemeral file system won't be an issue.  I've read up and it
> appears that it'll only lose any created files when the dyno is stopped or
> restarted.  That works fine for me since if the process is stopped /
> restarted, I wouldn't want those files anyway.  Plus each batch would be
> independent, not requiring any from a previous batch of files.

Your reading is correct.  Many, many applications -- including quite a
few Heroku components -- rely on manipulating the file system within
the running container with the understanding that it will go away
after the container is destroyed.  You can have a shot at knowing when
this is happening by treating SIGTERM in a program.  The grace period
is some handful of seconds.

> Just need to work out the SSH github deploy key needs to be configured for
> heroku to have repository access for the push.  Possibly this?

I'd suggest (although it may seem bizarre) stuffing the key into a
config var if you do this, and then materializing it on the file
system to aid 'git push'.

-- 
fdr

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Does Restlet work in Heroku?

2013-03-28 Thread Daniel Farina
On Thu, Mar 28, 2013 at 10:14 AM, Suman Varanasi
 wrote:
> Hi James
>
> for some reason, I keep getting Application Error in Heroku when I am trying
> the code..
>
> Can you please check? -http://restlet-template.herokuapp.com/ is giving
> Application Error. Probably Heroku got some issues?

There are no known problems at this time, I don't think.  The post you
are responding to is quite old, so some amount of bitrot is also
possible.

Any 500-like error code will raise the generic Heroku error message
unless one sets up custom error pages, which this application has not.
 I don't think James will see your mail unless you put him in the To:
list, or you get quite lucky.

--
fdr

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.