Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7821877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:46:35+00:00 2026-06-02T07:46:35+00:00

I have a very simple app running on heroku with nodejs and redis. It

  • 0

I have a very simple app running on heroku with nodejs and redis. It takes data posted to it periodically via an ajax post, and stores the data in a list in Redis.

I’ve run the app locally without issue, where it logs the data sent to it to redis without complaint. However, when I run it on heroku I get about 5-10 requests into it before it crashes, with a pretty non-specific redis error.

Dependencies:

"redis": "~0.7.1",
"hiredis": "~0.1.14",
"redis-url": "~0.1.0"

Code writing to redis (coffeescript):

app.post '/track', (req, res) -> 
  redis = require('redis-url').connect(app.settings.redis_url)

  if(req.body.userid)
    key = "locations:#{req.body.userid}"
    redis.rpush key, JSON.stringify({time: (new Date()).toString(), lat: req.body.latitude, lon: req.body.longitude})

The error I am getting is as follows:

Error: Uncaught, unspecified 'error' event.
2012-04-21T06:12:00+00:00 app[web.1]:     at Command.callback (/app/node_modules/redis/index.js:159:29)
2012-04-21T06:12:00+00:00 app[web.1]:     at HiredisReplyParser.<anonymous> (/app/node_modules/redis/index.js:256:14)
2012-04-21T06:12:00+00:00 app[web.1]:     at RedisClient.return_error (/app/node_modules/redis/index.js:446:25)
2012-04-21T06:12:00+00:00 app[web.1]:     at HiredisReplyParser.execute (/app/node_modules/redis/lib/parser/hiredis.js:41:18)
2012-04-21T06:12:00+00:00 app[web.1]:     at HiredisReplyParser.emit (events.js:67:17)
2012-04-21T06:12:00+00:00 app[web.1]:     at RedisClient.on_data (/app/node_modules/redis/index.js:422:27)
2012-04-21T06:12:00+00:00 app[web.1]:     at Socket.emit (events.js:67:17)
2012-04-21T06:12:00+00:00 app[web.1]:     at Socket.<anonymous> (/app/node_modules/redis/index.js:66:14)
2012-04-21T06:12:00+00:00 app[web.1]:     at TCP.onread (net.js:367:14)

This crashes the app, which heroku brings back eventually, but it then crashes again pretty quickly, within a few requests.

Anyone run into this before? I’m pretty new to node/redis, so this is probably something obvious. It’s just odd that it runs happily pretty much forever locally, but is dying like this on heroku…

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:46:36+00:00Added an answer on June 2, 2026 at 7:46 am

    Well, this was a clear case of RTFM and not sleeping on it before posting.

    I saw on another SO post that I could attach an error handler to the redis client via:

    redis.on "error", (err) ->
       console.log("Redis error: #{err}")
    

    This yielded

    Redis error: Auth error: Error: Error: ERR max number of clients reached
    

    in the logs, which was happening because was opening a new connection on each request and not closing it. I then moved my connection instantiation to the server.js file and then passed it into my route handlers as a parameter. Now the app runs fine with just one active connection…

    Hopefully this will help future people who have made a similar mistake…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple web-app running on GAE and we want to move
I have a very simple webforms app that will allow field techs to order
I have a very simple iPhone app that requires a random integer from 1-100.
I have a very simple OpenRasta app with a Home resource with a single
I have a very simple Rails app with a very simple relational database: Category
Deploying on JBoss AS 7.1.0.Final. I have a very simple test app. It was
I have a very simple Mac Cocoa app that just has a Web View
I have lately been developing a very simple app for iOS with PhoneGap. All
I have a very simple dialog defined as: import android.app.AlertDialog; import android.content.Context; import android.view.LayoutInflater;
I have two very simple, identical UITableViews in my app that are populated with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.