Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Listening to What Your Heroku Postgres Logs are Telling You

DZone's Guide to

Listening to What Your Heroku Postgres Logs are Telling You

· Performance Zone
Free Resource

Download our Introduction to API Performance Testing and learn why testing your API is just as important as testing your website, and how to start today.

[This article was written by Matt Kiernan]

Debugging in development can be challenging enough when dealing with just your application layer. In production, the root cause of an issue could be hiding within one of several locations, including your database.Heroku Postgres

One of the many great things about Heroku is how well it incorporates different types of events into its own logs.

When tailing Heroku logs, you can see events from not only Heroku, but also your application and database. And Postgres is the most popular database used on Heroku, for good reason.

The two services work together seamlessly and can be set-up in seconds. But tailing logs, especially when log events are coming from different services, can become cumbersome and difficult to analyze.

Today, we’re happy to announce the launch of our latestLogentries Community Pack for Heroku and Postgres users, offering pre-configured queries, tags and dashboards specifically built for interpreting Heroku Postgres logs. Here are three specific use cases for how the Logentries Heroku Postgres Community Pack can come in handy:

Unoptimized Queries

Whether you’re missing a necessary index or inadvertently built an N+1 query into your code, unoptimized queries can slow and even take down the fastest databases. The Heroku Postgres Community Pack includes both graphs for average query time and tags identifying queries taking longer than 50ms or 2 seconds on Postgres 9.2+.

Connection Limits

Heroku purposefully sets a limit on the number of connections you can make to your postgres database in an effort to preserve performance. Knowing things like when a user has too many connections or when you’ve reached your connection limit can be crucial to keeping things running smoothly. The Heroku Postgres Community Pack includes a series of tags for understanding what’s happening with your Postgres connections and indicating when it may be time to upgrade your Heroku Postgres plan.

FATAL, WARNING & ERROR Messages

Some log events carry more weight than others. While warning messages may be caused by harmless events, FATAL messages are indicating an error that caused the current session to abort. Understanding if there are larger trends behind the frequency of critical events can be be the difference between catching a hidden underlying issue and finding out about the issue once its too late. The Heroku Postgres Community Pack includes saved queries and charts for comparing the frequency of FATAL, WARNING & ERROR messages to reveal possible trends.

If you’ve come to expect the simple, plug and play nature of Heroku add-ons, the Logentries Heroku Postgres Community pack will not disappoint.

Using the pack is as simple as downloading it from the Logentries Community and uploading it to your Logentries account.

Click here to download the Heroku Postgres Community Pack.

Find scaling and performance issues before your customers do with our Introduction to High-Capacity Load Testing guide.

Topics:

Published at DZone with permission of Trevor Parsons, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}