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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:50:19+00:00 2026-06-17T22:50:19+00:00

I have a nodejs application that I run like this, over SSH: $ tmux

  • 0

I have a nodejs application that I run like this, over SSH:

$ tmux
$ node server.js

This starts my node application in a tmux session.

Obviously, I don’t have the SSH session open all the time.

What I’ve been finding is that occasionally my application can get in a state where it won’t server up any pages. This might be related to the application itself, or perhaps just a poorly disconnected SSH session.

Either way, simply logging into SSH, running:

$ tmux attach

And giving focus to the pane makes everything responsive again.


I thought the entire point of node.js was that everything is non-blocking – then what’s going on here?

  • 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-17T22:50:20+00:00Added an answer on June 17, 2026 at 10:50 pm

    When a pane is is copy mode, tmux does not read from its tty. If some program running “in” in the tty continues to generate output, then the OS’s tty buffer will eventually fill and cause the writing process/thread to block. I do not know the internals of Node.js, but it may not expect writes to stdout/stderr to block: the console functions do not seem to have callbacks, so they may actually be blocking.

    So, Node.js could very well end up blocked if the pane in which it was running was left in copy mode when your SSH connection was dropped.

    If you need to assure non-blocking logging, then you might want to redirect (or tee) your stdout and stderr to a file and use something like less to view the prior logs (avoiding tmux’s copy mode since it might cause blocking).

    Maybe something like this:

    # Redirect stdout/stderr to a file, running Node.js in the background.
    # Start a "less +F" on the log so that we immediately have a "tail" running.
    node app.js >>app.log 2>&1 & less +F app.log
    

    Or

    # This pane will act as a 'tail -f', but do not use copy-mode here.
    # Instead, run e.g. 'less app.log' in another pane to review prior logs.
    node app.js 2>&1 | tee -a app.log
    

    Or, if you are using a logging library, it might have something that you can use to automatically write to files.

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

Sidebar

Related Questions

I have a simple application that I run using node.js. Below is my server.js:
I have a node.js (v0.6.12) application that starts by evaluating a Javascript file, startup.js.
I'd like to provide end-user scripting (that would run server-side) in an application. I've
I use node.js and socket.io. I have an application that runs on the IP
Let's say I have a nodejs/express application on production server. If I want to
I have a nodejs script that uses phantomjs-node to scrape a webpage. It works
I have created a nodejs application which works fine in a single core. This
Complete C# newbie here, so cut me some slack. I have this application that
I currently have a TCP server application written in .Net that receives and submits
In my application I have a function to populate listview.I want to run this

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.