If you want to pause and examine at some particular sequence of log messages while your server continues processing requests, it is probably best to directly view the log files instead; you might use less -R log/development.log
.
While a tmux pane is in “copy mode” (the mode used to view a pane’s history), tmux does not read any output from the processes running in the pane’s tty. If the processes continue to write output to the tty, then the OS’s tty buffer will eventually fill. When a program writes to a tty with a full buffer, it causes the process to block so that the buffer does not overflow; this is what causes your server to temporarily stop processing requests.
The timeline looks like this:
- You enter copy mode to view some old output.
tmux stops reading from the tty.
- Your Rails server continues to write to the tty as it handles ongoing requests.
The OS absorbs these writes into a tty buffer of some limited size.
- Eventually, the OS tty buffer fills up and causes further writes to the tty to block.
This is where the Rails server “freezes”; it is stuck waiting for the OS to return from (e.g.) a write(2) call it made to display a log message.
- You exit copy mode.
tmux resumes reading from the tty, draining the buffered output and accepting new output.