heroku-postgres

how to turn off Heroku SQL logs from postgres

為{幸葍}努か 提交于 2019-12-14 00:54:01
问题 I'm running an application on Heroku that uses postgres. All of my SQL statements are coming through in my logs; I'd like to turn this off. They look like this: Dec 03 05:41:36 ti-core app/postgres: [1566-2] #011FROM alias Dec 03 05:41:36 ti-core app/postgres: [1566-3] #011WHERE alias.nid = E'10.5334/sta.at' AND alias.namespace = E'doi' Dec 03 05:41:36 ti-core app/postgres: [1566-4] #011 LIMIT 1 I can't figure out where I've set this level of heroku postgres debugging and where to turn it

How to enable quiet mode for Postgres commands on Heroku

霸气de小男生 提交于 2019-12-13 16:22:49
问题 When using the psql command line utility on my local machine, I have the option to use the -q or --quiet switch to tell Postgres to do it's work quietly - i.e. it won't print every single INSERT statement to the console if you're doing a large import. Here's an example of how I'm using it: psql -q -d <SOME_DATABASE> -f <SOME_SQL_FILE> However, when using the pg:psql command line utility in Heroku, that option doesn't seem to be available. So I'm currently having to use it like so: heroku pg

too many connections for role “username” heroku nodejs - what is yobuko?

谁说胖子不能爱 提交于 2019-12-13 16:16:48
问题 I have two sites that started receiving the too many connections for role error. The site crashes several times a day with that error and the only thing that helps is the cli heroku pg:killall The application releases all the connections correctly - it's a very simple and basic application that uses postgres connection pool. When I look at the open sessions on pgadmin I see multiple connections by something called "yobuko". As I follow it, it opens more and more connections until it reaches

heroku migrations silently failing

♀尐吖头ヾ 提交于 2019-12-13 05:19:56
问题 Note: this is my first time configuring a rails application, deploying a rails app and setting up a database. I very well might be doing something obviously stupid. I have a working rails application setup with postgres 9.3. I can run migrations, run my server locally and get a running application locally. I pushed my code up to heroku and at one point it ran. Now when I run the heroku console it shows that my database is totally empty and I cannot figure out how to recreate it. I am using v

django heroku makemigrations ignoring changes in models

时间秒杀一切 提交于 2019-12-13 00:28:08
问题 I deleted two models from models.py, and when I run makemigrations and migrate locally, everything is fine. When I run makemigrations on Heroku, I get the following message, where Building and BuildingInstance are the models I deleted: Migrations for 'hello': 0002_building_buildinginstance.py: - Create model Building - Create model BuildingInstance When I run migrate, I get: Running migrations: No migrations to apply. Your models have changes that are not yet reflected in a migration, and so

Heroku local doesn't read my .env file

℡╲_俬逩灬. 提交于 2019-12-12 15:26:49
问题 I tried the heroku node sample at: https://devcenter.heroku.com/articles/getting-started-with-nodejs#introduction And used Postgres as the db. All worked. Now I wanted to run it local, so I used the sample from: https://devcenter.heroku.com/articles/heroku-local To get the DATABASE_URL to my .env file - but I couldn't get it to work even though when I ran Heroku local it displayed: [OKAY] Loaded ENV .env File as KEY=VALUE Format The database still did not connect and when I added: console.log

Unable to register a user in django deployement on heroku?

北慕城南 提交于 2019-12-11 14:42:56
问题 I've deployed a django-blog web-app on heroku. Its working but with an error. When i register a new user it says user created but when I try to login through registered user it says username and password didn't match. And when I login in my admin panel then the user i registered wasn't created at all. Here's my settings.py file import os import django_heroku BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) TEMPLATE_DIR = os.path.join(BASE_DIR, 'templates') STATIC_DIR =

Error in deploying django website on heroku

╄→尐↘猪︶ㄣ 提交于 2019-12-11 11:34:03
问题 I am deploying my django website in heroku with DATABASE = {} in django's setting.py file. I am following all the steps of heroku help and every command ran but some applicaton error is coming on running command- heroku open (jango)dc@dc-comp-4:~/website$ heroku open Opening evening-waters-7886... done (jango)dc@dc-comp-4:~/website$ (process:8176): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed and my heroku log status is- dc@dc-comp-4:~/website$ heroku logs 2015

Heroku pipeline. Run commands on production app (not staging)

房东的猫 提交于 2019-12-11 07:30:22
问题 I am using the heroku pipeline. I set up my two apps. One for staging, one for production. Both use "production" as the environment variable. If I run heroku run rails c I can access the console on my staging app. The heroku website, allows to run a console in the production app as well, but only with the predifined heroku run part. Which means if for whatever reason I need to run a more fundamental command (for example heroku pg:reset ; I know I know), I can't. So is there a way to specify

Couldnt upload My flask application on Heroku

二次信任 提交于 2019-12-11 02:15:05
问题 I have a flask application with postgresql db So the steps are: 1.gunicorn 2.Procfile 3.heroku login 4.heroku apps:create flask-lili 5.heroku addons:add heroku-postgresql:dev 6.heroku pg:promote HEROKU_POSTGRESQL_ORANGE_URL 7.sudo pip install psycopg2 8.pip freeze> requirements.txt 10.git add . 11.git commit -m "create requirements.txt" 12.git push origin master 13.git push heroku master 14.heroku open I got no error when I run command git push heroku master, But Not sure that should I use