Heroku timeout with custom Buildpack - heroku

I have a custom Heroku Buildpack that compiles CMake and OpenCV. The problem is, OpenCV takes FOREVER to compile. I've tried precompiling OpenCV and pulling it in during my build; however, I have not yet been successful in doing so.
I recently came across the COMPILE_TIMEOUT=n env variable that can be set to override the 15 minute timeout, but it's not working. Does anyone know if this env is still supported? Or if there is another approach besides precompiling?
I would ideally like to have the flexibility of compiling on the fly if I update to the latest version of OpenCV (compilations are cached on Heroku so I'm not waiting around for a full build on every deploy).

I think your best shot would be to build your binaries beforehand. However, Heroku still doesn't have great support for this.
See these links for some suggestions:
https://discussion.heroku.com/t/compiling-a-custom-binary-for-buildpack/224
https://discussion.heroku.com/t/opencv-and-statically-compiled-python/105

Pre-compiling binaries is the way to go; however, it requires time and effort that I'd rather avoid. I reached out to Heroku and they were willing to increase our build time to 30 minutes. Unfortunately, 30 minutes was still not enough to compile OpenCV. The Heroku team was kind enough to Anvil which happens to be the same build service that runs on Heroku. Looks promising!
https://github.com/ddollar/heroku-anvil

Related

if packagist says master build failing, If I install package with composer, will it work?

I'm kinda new to using composer (but I think it is awesome) so please pardon the noob question.
Folks are requesting exports fancier than csv so I thought I'd install phpOffice excel using composer. But, the master is 'build failing' and the develop is 'build error'. An I correct in assuming the master build failed means I should not install this with composer because it won't work?
In researching this I also found phpOffice spreadsheet, but that appears to be in development still.
Any other alternatives if I cannot use phpOffice excel due to the build status issue?
Regardless of what package you are talking about, if the builds for any of the branches are failing it just means that the builds for any of the branches are failing, that's it.
The master and develop branches may be well ahead of the latest tag, and chances are the maintainers are experimenting with it, and working towards a passing build again.
If you trust the maintainers not to release broken software, then it's safe to use one of the tagged versions, so for example, run
$ composer require phpoffice/phpexcel:^1.8.1
to install the latest stable version.
Note It appears that phpoffice/phpexcel:1.8.1 has been released on 2015-05-01; quite some time has passed since. Whether or not this package works for you, then, is something you have to find out for yourself.
For reference, see:
https://packagist.org/packages/phpoffice/phpexcel

Very heavy bundle size of react development website

I am creating a react website. Its almost ready but when I am debugging it, its load time is 1.2 Minutes and bundle size is 28 MB.
I have tried following solutions without success so far:
https://medium.com/#rajaraodv/two-quick-ways-to-reduce-react-apps-size-in-production-82226605771a#.qfpspcha4
https://hackernoon.com/optimising-your-application-bundle-size-with-webpack-e85b00bab579#.t3vabgy27
How to minimize the size of webpack's bundle?
Did you try changing your devtool setting? I believe inline-source-map is the reason for the large file size. More info on the different devtool settings here. For production I personally use devtool:'cheap-module-source-map' and have great success with it. I hope this help some, webpack can sure be frustrating at times.
Also to have a lighter dev build I would suggest to use devtool:'eval', It's probably the most efficient as far as development goes.

Getting packages for GO language

The below command is taking ages with no output or anything, is there an alternative way to download packages for go language.? I am new to golang.
go get -u github.com/gogits/gogs/
PS: my net connection is not that slow, downloading through git takes around 1 min, but i can't individually do that for all dependencies.
Edit 1: Small packages like go get github.com/tools/godep downloads and install flawlessly, i have the problem only with github.com/gogits/gogs/ . Its stuck there for an hour. Even a download progress would have been helpful.
go get command is working but its terribly slow for packages that have lots of dependencies. the -v flag(not in doc) helped me to get a verbose output of what is happening.
Took almost an hour to finish. Culprit might possibly be github or my ISP.
Verbose output should had made default by the developers.
*sorry for my English.
You can use GoDep which is a powerful Go dependency manager: https://github.com/tools/godep
GoDep also helps you to have a predictable build since it freezes dependencies in your app
Very easy to get started, just follow instruction on its Github page.

How can I use a buildpack on Heroku that runs more than 15 mins?

I tried using COMPILE_TIMEOUT: 6000 and even set heroku labs:enable user-env-compile but it didn't help
As far I can know, you cannot exceed the documented 15 minute limitation.
The simple answer is that no, you can't. At least I didn't find any evidence that it is possible.
The longer answer is that the Heroku way of doing it is by saving precompiled packages online and fetching them during the buildpack execution. To build binaries in dyno environment one should use vulcan. A good example of such usage can be found here, notice the two compilation scripts under support folder.

Any buildpack that can deploy Meteor with PhantomJS support on heroku?

I'd like to run a Meteor.js app with the "spiderable" package on Heroku. Is there a buildpack or anything else to deploy it on Heroku? (PhantomJS in needed)
This buildpack (which I wrote) works with Meteor > 0.9.3 and includes phantomjs:
https://github.com/AdmitHub/meteor-buildpack-horse
I don't know how you're stuck with this, since in practice it's pretty straightforward to install an NPM module as shown in this guide. You only need to swap underscore in that example with phantomjs.
A very good buildpack to use is oortcloud's meteorite buildpack. I've used the meteor-only buildpack, but I've encountered way to many issues with it, but with the aforementioned I have had no problems with it so far.
As for the spiderable package, meteor add spiderable.
Fair warning though: running Meteor on Heroku requires alot of research on how to actually run your app, especially with providing correct environment variables. If you will have a problem with that, this would probably not a good place to discuss any of that.
On a side note: Next time, I implore you to be a little more clear about your problem and specify what your goals really are, and what have you tried so far. Seriously, who upvotes these things?

Resources