Tag Archives: heroku

Checking Idle Transaction on Heroku’s Postgresql

If you ever have connection problem with your postgresql instance on heroku, this post might help you.

One time one of my resque workers is dead when running long query (deleteing ~80k rows in a table). After that I got tons of timeout errors from my app. I even can’t do DELETE and UPDATE from one-off dyno

First, lets check all the process connected to your heroku postgresql instance

heroku pg:ps -a appname

you can see if there is some “idle in transaction” process. It’s likely the culprit. Take notes of the pid, then kill it with

heroku pg:kill pid_number -a appname

After you kill all those idle processes, your database should be free again.

Large CSV Import on Heroku

In the recent months, I’ve been lucky to work with Tyler Tringas, the founder of Storemapper.co. For your info, store mapper is a store locator snippet that you can put on your website and shopify page. We already have a lot of happy customer such as Beardbrand and Uber. If you are a business owner looking for a store locator solution, try it out!

One interesting that we solved recently is how to import a large CSV file on heroku. Tyler has documented it well in his blog post. If you have any question regarding that, feel free to comment here 🙂