Web Dyno Unresponsive for 10 minutes after deploy/restart

2012-03-21 Thread Joe Kueser
I'm stumped, so I throw this out there in hopes that someone has 
experienced something similar.

I have a fairly large app (uses Spree models to serve up about 1,200 
products, but custom views.) The app runs like a champ locally, up and 
responsive within a second or two since upgrading to Rails 3.2. Switching 
to production on my local box makes it even faster. Never have to wait.

On Heroku, however, it's a different story. I deploy, the dynos start up as 
expected, but I get good ol' Error H12 (Request timeout) for about 5 to 10 
minutes. I have 2 dynos spinning up, and one will become responsive at that 
5 minute mark, and the other will continue to timeout. After 10 minutes, 
everything seems fine.

This happens every time a dyno restarts too. So if the dyno chokes and 
Heroku is kind enough to restart it for me, the site will timeout on all 
requests hitting that dyno for 5 to 10 minutes.

I have hooked up NewRelic to see if I can see anything weird going on, and 
whatever request comes in just hangs. There is no SQL being executed, there 
are no infinite loops. Just the stinkin' timeout.

The only code that is common to all pages builds my navigation based on my 
Spree::Taxon hierarchy. So maybe my next step is just to make that static 
since it's not likely to change any time soon. Other than that, I'm stumped.

If it matters, I'm using Thin to serve up the pages, and saw the same 
behavior with Webrick. Considering trying Unicorn, but it doesn't feel like 
the server is the problem.

Any ideas? Have you seen anything similar? Any tips for finding where 
things are actually hanging?

Thanks in advance.

Joe

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



Re: Web Dyno Unresponsive for 10 minutes after deploy/restart

2012-03-21 Thread Joe Kueser
Thanks, Keenan, I'll give it a try. 

Plenty of information to get me started. Thanks.

There are a couple of things you suggested that definitely have more than a 
hint of possibility. I am using paperclip, but things are successfully saving 
to S3, so (hopefully) that's not a problem. I've had a few asset bundling 
problems that may be part of the issue, and I don't have a JavaScript bundle. 
What will Heroku do if that's not included? Definitely worth a try. Is there a 
gem that all the cool kids include?

Thanks for your help.  All give it all a try first thing when I get into work 
in the morning. 

-- 
Joe Kueser
Sent from an actual computer! 
(MacBook Air, to be specific)


On Wednesday, March 21, 2012 at 5:34 PM, Keenan Brock wrote:

 I tend to jump to the conclusion that it is a disk access issue.
 
 It can be paperclip, imagemagick, sass, asset bundling, and stuff like that 
 that may be misconfigured to write to the local filesystem.
 
 Locally I:
 
 rm -rf tmp/*
 chmod -R a+w tmp
 sudo su another_user
 ./rails s
 
 (you may have to tweak your parent directories above your source directory to 
 at least be world executable. At least for the time being.
 
 
 then I launch chrome and watch things fail. Or I tweak the permissions and 
 find out what I did wrong.
 
 
 
 Not sure if this is enough information for you to run with
 It could also be a services configuration error. e.g.: you are hooking up to 
 a localhost redis/memcached.
 
 try tweaking those values and ensure your local setup fails on those setups.
 
 And if you do asset stuff on heroku, make sure you have a javascript gem that 
 will work in heroku. The mac has a javascript environment that is loaded by 
 default.
 
 
 Best of luck. 
 
 On Wednesday, March 21, 2012 at 2:59 PM, Joe Kueser wrote:
 
  I'm stumped, so I throw this out there in hopes that someone has 
  experienced something similar.
  
  I have a fairly large app (uses Spree models to serve up about 1,200 
  products, but custom views.) The app runs like a champ locally, up and 
  responsive within a second or two since upgrading to Rails 3.2. Switching 
  to production on my local box makes it even faster. Never have to wait.
  
  On Heroku, however, it's a different story. I deploy, the dynos start up as 
  expected, but I get good ol' Error H12 (Request timeout) for about 5 to 10 
  minutes. I have 2 dynos spinning up, and one will become responsive at that 
  5 minute mark, and the other will continue to timeout. After 10 minutes, 
  everything seems fine.
  
  This happens every time a dyno restarts too. So if the dyno chokes and 
  Heroku is kind enough to restart it for me, the site will timeout on all 
  requests hitting that dyno for 5 to 10 minutes.
  
  I have hooked up NewRelic to see if I can see anything weird going on, and 
  whatever request comes in just hangs. There is no SQL being executed, there 
  are no infinite loops. Just the stinkin' timeout.
  
  The only code that is common to all pages builds my navigation based on my 
  Spree::Taxon hierarchy. So maybe my next step is just to make that static 
  since it's not likely to change any time soon. Other than that, I'm stumped.
  
  If it matters, I'm using Thin to serve up the pages, and saw the same 
  behavior with Webrick. Considering trying Unicorn, but it doesn't feel like 
  the server is the problem.
  
  Any ideas? Have you seen anything similar? Any tips for finding where 
  things are actually hanging?
  
  Thanks in advance.
  
  Joe 
  
  -- 
  You received this message because you are subscribed to the Google Groups 
  Heroku group.
  To view this discussion on the web visit 
  https://groups.google.com/d/msg/heroku/-/1rnFqaMNssMJ.
  To post to this group, send email to heroku@googlegroups.com 
  (mailto:heroku@googlegroups.com).
  To unsubscribe from this group, send email to 
  heroku+unsubscr...@googlegroups.com 
  (mailto:heroku+unsubscr...@googlegroups.com).
  For more options, visit this group at 
  http://groups.google.com/group/heroku?hl=en.
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Heroku group.
 To post to this group, send email to heroku@googlegroups.com 
 (mailto:heroku@googlegroups.com).
 To unsubscribe from this group, send email to 
 heroku+unsubscr...@googlegroups.com 
 (mailto:heroku+unsubscr...@googlegroups.com).
 For more options, visit this group at 
 http://groups.google.com/group/heroku?hl=en.

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



Re: serving wong version ??

2012-03-20 Thread Joe Kueser
Hi Jay,

I had a similar problem with a Rails app and about the time I was ready to
give up I ran heroku restart and the problem fixed itself.

The only time I have seen similar behavior in real live (off Heroku) is
when .pyc files are hanging out that shouldn't be there. Deleting them
usually does the trick. This shouldn't be a problem with  you unless you
are committing .pyc files, which could cause all kinds of nasty things to
happen.

Not sure if this will help you, but it's worth a try.

Joe K

On Mon, Mar 19, 2012 at 3:29 PM, Jay Baker jbaker.w...@gmail.com wrote:

 Hi all. I'm going nuts looking at this. I have an app that has been fine.
 I've been deploying to it now and then for a few weeks. Today things have
 gotten out of sync. I have a local branch master that is a tracking branch
 of my remote heroku/master. Both are pointing to the same commit. However,
 when I hit the pp, it is running code from several commits ago. For
 example, I am getting an exception from a line that is no longer in the
 code base. It is like the app is not updating. Nothing funky in the logs,
 and again, git says that are both pointing to the same commit. I'm running
 the python cedar stack. Obviously I am missing something that is staring me
 in the face, but I can't find it. Any helpful pointers?

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




-- 
--
Joe Kueser
(Sent from Gmail)

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