I still cannot run mLab mongo DB on my app in heroku, I use MONGODB_URI to mlab in heroku, i need to add add-ons mLab to heroku or is it not necessary for my spring bott app? if it is why do I have to add credit card if sandbox is free?
1 Answers
For your application to access the MONGODB_URI
config variable, you must add an mLab add-on to your Heroku app or set the MONGODB_URI
config variable manually.
Heroku requires a credit card for verification when you add an add-on (even if that add-on is free). You won't be charged for using free add-ons. See the Heroku documentation here: https://devcenter.heroku.com/articles/account-verification.
If you do not want to add a credit card to Heroku, you can make a sandbox database directly on https://mlab.com/. mLab does not require a credit card for sandbox databases when you go through their website. You will need to manually set the MONGODB_URI
config variable to the MongoDB connection string provided by mLab. You can see how to set config variables here: https://devcenter.heroku.com/articles/config-vars
You may also find the mLab add-on documentation helpful: https://devcenter.heroku.com/articles/mongolab

- 1,416
- 1
- 14
- 23
-
i have mLab DB and add conf vars URI from heroku app, but it dont works and I dont know how to solve this problem, cause heroku is black-box i cannot see any details from spring logs of my app why isnt connect to db etc. i tested hundred times on my localhost another server but on heroku is hard to find where can be problem – petmik Feb 15 '18 at 22:14
-
You can look at your application logs on Heroku by running `heroku logs` (more info here: https://devcenter.heroku.com/articles/logging) – tfogo Feb 15 '18 at 22:25
-
after git push heroku master or mvn heroku:deploy spring app no errors but i see heroku error: 2018-02-16T19:04:11.317637+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=pmsoft.herokuapp.com request_id=4d862f16-afb2-4fa4-a4c3-aebcbd286820 fwd="78.45.216.204" dyno= connect= service= status=503 bytes= protocol=https – petmik Feb 16 '18 at 19:07
-
i add mongo uri direct to application.properties and it is OK only if I build whole war and deploy to heroku with heroku:deploy-war ............. with heroku:deploy or git push heroku master application never starts strange – petmik Feb 16 '18 at 19:10