Heroku server crashing. Us or them

Over the last 24 hours, our rails servers have become essentially unusable. I see that heroku have got an open issue related to buildpacks and github repositories too. Is anyone else experiencing this same issue or is our code the problem?

It sounds like you’re experiencing significant performance issues with your Rails servers on Heroku, and you’ve noticed an open issue related to buildpacks and GitHub repositories. Since Heroku’s infrastructure plays a significant role in how your application behaves, it’s possible that their current issues could be impacting your servers, especially if you are using GitHub for deployments or rely on certain buildpacks that may be affected.

Here are a few things you can check and consider:

1. Heroku Status and Issues:

  • Check the Heroku Status Page: If Heroku has acknowledged the issue, their status page is the best source for live updates. If buildpacks or GitHub deployments are affected, you’ll likely see detailed reports here.
  • Monitor the specific issue: If Heroku has reported an issue related to buildpacks, keep track of it and watch for updates or resolutions. Sometimes it’s a widespread issue and can impact performance or cause interruptions in deployments.

2. Evaluate Recent Changes in Your Code:

  • Recent Code Deployments: If you’ve deployed any new code recently, try rolling back to an earlier version to see if performance improves. This will help you rule out whether the problem is with your code or Heroku.
  • Check for Database or Memory Leaks: It’s possible that recent changes to your code have introduced a memory leak or an inefficient database query that’s slowing things down. Review any significant recent changes, especially related to database interactions, caching, or background jobs.

3. Rails and Heroku Logs:

  • Examine Heroku Logs: Run heroku logs --tail to get detailed logs from your app. Look for any specific errors, long response times, or database timeouts that might point to the root cause of the slowdown.
  • Inspect Rails Logs: If you’re using tools like New Relic, Skylight, or even just detailed Rails logs, these can give you insight into what part of the application is experiencing issues—whether it’s slow database queries, timeouts, or external service delays.

4. Heroku Dyno Issues:

  • Restart Dynos: Sometimes, restarting the dynos can help resolve temporary issues. You can restart them with heroku restart.
  • Scaling Dynos: If your application is experiencing increased traffic or if your dynos are underpowered for the load, try scaling your web dynos up temporarily to see if that helps improve performance. You can scale up like this:
heroku ps:scale web=2
  • Review Heroku Metrics: Heroku provides application metrics, which can help you spot issues with memory usage, response times, or CPU usage. Check if your application is hitting any resource limits.

5. Heroku Buildpack or Add-on Issues:

  • Update Buildpacks: If you’re using custom or third-party buildpacks, you might want to check if any of them require updates or if there’s an ongoing issue with them.
  • Heroku Add-ons: If you’re relying on specific add-ons (like Redis, Postgres, etc.), check the status of those services. Any issues with add-ons could also impact the performance of your app.

Next Steps:

  1. Check the Heroku status page for ongoing issues.
  2. Investigate your logs for any clues of what might be causing the issues.
  3. Roll back recent changes in your app to see if it’s a code-related problem.
  4. Restart and scale dynos to see if performance improves.

By following these steps, you should be able to determine whether this is related to Heroku’s infrastructure or an issue within your code.