Loomio

Issues with deploying to Heroku

EW Elias Westerberg Wed 23 Apr 2014 11:32AM Public Seen by 20

I've installed Loomio on a virtual machine and managed to run it locally. However, after following the instructions on the wiki on how to deploy Loomio to Heroku I've come to a dead end with the application replying with ERR_CONTENT_DECODING_FAILED when I try to access the application at https://evolutetest.herokuapp.com.

I can however access the static resource /privacy.

heroku run rake db:migrate and db:seed seems to be working (some deprecation warnings) and the following message:

You are missing the following optional environment variables: ["AWS_ATTACHMENTS_BUCKET", "BING_TRANSLATION_APPID", "BING_TRANSLATION_SECRET", "NAVBAR_LOGO_PATH", "NAVBAR_CONTRIBUTE", "TAG_MANAGER_ID"]

They have been set to defaults automatically."

Any ideas?

EW

Elias Westerberg Fri 25 Apr 2014 7:03AM

It really looks like the actual assets are corrupted during pre-compile. For instance:

https://evolutetest.herokuapp.com/assets/loomio-facebook-timeline-113a724c47ea2053e78285993f966e95.png

Assets are created with content-length > 1... but not sure if they are the right size... attached a list of my public/assets.

EW

Elias Westerberg Mon 28 Apr 2014 8:36AM

Also tried to precompile assets locally and pushing them to Heroku. Same error.

EW

Elias Westerberg Mon 28 Apr 2014 10:19AM

Hmm... I guess assets are compiled fine anyway. Locally I can open them and they look OK. When I try to access them on Heroku however it seems they cannot be read. Something is concatenated before the actual file. Check this weird looking application-xxx.js for instance.

EW

Elias Westerberg Fri 2 May 2014 9:47AM

@mixirving any other suggestions?
I can see that both my loomio s3 buckets are empty.
Amazon recently changed their policy on access keys so I had to set it up a bit differently than in the guide. Perhaps this is causing my issues?

MI

mix irving Sat 3 May 2014 12:21AM

I'm honestly not sure.
I think this could a case of us needing to go through and trying to replicate the setup for ourselves and seeing if we can replicate the problem. Apologies we've not been able to support you more with this @eliaswesterberg. At the moment a lot of us are needing to focus of finding some paid contracts, so can't afford to do this.

The change in Amazon setup is a bit frustrating, will have to do some reading/ learning on that front. If you have any notes to contribute to the guide they would be most appreciatred.
At the moment our priority is working on getting a Docker setup up and running, to streamline this process.

EW

Elias Westerberg Wed 7 May 2014 7:50AM

No worries, I understand that you are fully occupied with other stuff. It makes sense to focus on creating an easier installation for everyone instead on focusing on individual issues.

When we have something that actually works, I'll be happy to contribute my notes, but for now maybe my notes will just get people in the same kind of trouble :P

Anyway, another developer in our team is setting up a loomio production server in parallel, let's see if he has more luck with getting it running.

I'll report back when we have any progress.

EW

Elias Westerberg Mon 12 May 2014 2:42PM

FINALLY!

The problem was the Heroku memcachier add-on. That one is obviously mandatory. After adding it to my app all assets are served correctly!

Please add the following lines to the instructions:

Add Memcachier add-on to your app:
heroku addons:add memcachier

@mixirving: I've shared our installation notes document with you on google drive. Might be helpful for others as well.

I'm super happy this finally worked out. Now I can do some real work :)

SP

Steve Phillips / @elimisteve Tue 2 Dec 2014 4:15PM

How well does Loomio run on Heroku now?

RG

Robert Guthrie Wed 10 Dec 2014 9:01AM

@elimisteve loomio.org runs on heroku. We have three 2X dynos which handle between 100 and 400 requests per minute with an average response time of 160ms.

SP

Steve Phillips / @elimisteve Sun 28 Dec 2014 10:11PM

@robertguthrie Thanks for the infrastructure info. The 2x dynos handle 100-400 reqs/minute each or combined?

RG

Robert Guthrie Sun 28 Dec 2014 10:30PM

combined.. but not fully utilised.