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 8841517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:44:15+00:00 2026-06-14T10:44:15+00:00

My app: Node.js, Express, some middleware including connect-assets and express.static. All running on local

  • 0

My app: Node.js, Express, some middleware including connect-assets and express.static.

All running on local machine (OSX, Node 0.8) in development mode (thus express.static).

Probably important details: I recently made the whole app work through HTTPS (with redirect from HTTP when necessary) and while developing I use self-signe certificate (enabled in my browser, of course).

Now, the app is often failing wit stack traces like that:

(1)

stream.js:81
  throw er; // Unhandled stream error in pipe.
        ^
Error: write EPIPE
    at errnoException (net.js:769:11)
    at Object.afterWrite (net.js:593:19)

(2)

stream.js:81
  throw er; // Unhandled stream error in pipe.
        ^
Error: socket hang up
    at SecurePair.error (tls.js:948:15)
    at EncryptedStream.CryptoStream._done (tls.js:432:17)
    at EncryptedStream.CryptoStream._pull (tls.js:577:12)
    at SecurePair.cycle (tls.js:866:20)
    at EncryptedStream.CryptoStream.end (tls.js:405:13)
    at Socket.onend (stream.js:66:10)
    at Socket.EventEmitter.emit (events.js:126:20)
    at TCP.onread (net.js:417:51)

(3)

stream.js:81
  throw er; // Unhandled stream error in pipe.
        ^
Error: socket hang up
    at createHangUpError (http.js:1264:15)
    at CleartextStream.socketCloseListener (http.js:1315:23)
    at CleartextStream.EventEmitter.emit (events.js:126:20)
    at SecurePair.destroy (tls.js:938:22)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

Important: this happens often but not every time, so I assume this not to be a bug in my code.

I found this can be due to express.static and open files limit so I ran ulimit -n 10000 – with no effect, unfortunately.

Any ideas? This starts to be extremely frustrating.

  • 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-14T10:44:17+00:00Added an answer on June 14, 2026 at 10:44 am

    OK, looks like I found the answer (at least I found a similar problem mentioned, tried their fix and it stopped falling):

    the express.static middleware must be the last in the chain

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

Sidebar

Related Questions

In my app (node / express / redis), I use some code to update
I'm running some issues with my node application after upgrading to Express 3.0. So,
I am trying to run some Mocha/Zombie.js tests on my new node.js (express) app.
I'm working on a node express app, and I've got it working well with
I'm trying to POST data from an iOS app to Node.js/Express. I cannot get
I have the following express node.js app. It's using the 'redis' npm package. app.get(/test,function(req,res){
I'm building an app with backbone/RequireJs on the front end and node/express on the
In my node.js express app I'm submitting a form, to an action on a
I'm working on a Node app that uses Express and SocketIO. I want to
I'm using the Javascript SDK inside a node.js (Express) App. Connecting Users works fine,

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.