Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp unavailable session response message #109

Merged
merged 1 commit into from
Feb 24, 2015

Conversation

gsamokovarov
Copy link
Collaborator

When a user hit this message, it usually means two things:

  1. The underlying server have been restarted.
  2. The user runs in multi-process server and the request hit a worker,
    which doesn't store the session in memory.

I'm trying to hit the users here about the second case, since we
received yet another report of this happening and people getting
confused of why the console doesn't work.

screen shot 2015-02-21 at 3 47 42 pm

When a user hit this message, it usually means two things:

1. The underlying server have been restarted.

2. The user runs in multi-process server and the request hit a worker,
   which doesn't store the session in memory.

I'm trying to hit the users here about the second case, since we
received yet another report of this happening and people getting
confused of why the console doesn't work.
@gsamokovarov
Copy link
Collaborator Author

@rafaelfranca, @chancancode if anyone of you guys want to chime in and help me tweak the message if needed, that would be great :)

gsamokovarov added a commit that referenced this pull request Feb 24, 2015
Revamp unavailable session response message
@gsamokovarov gsamokovarov merged commit 3775fe0 into rails:master Feb 24, 2015
@chibicode
Copy link

@gsamokovarov

The README of better_errors says:

Better Errors works by leaving a lot of context in server process memory. If you're using a web server that runs multiple "workers" it's likely that a second request (as happens when you click on a stack frame) will hit a different worker. That worker won't have the necessary context in memory, and you'll see a Session Expired message.

If this is the case for you, consider turning the number of workers to one (1) in development. Another option would be to use Webrick, Mongrel, Thin, or another single-process server as your rails server, when you are trying to troubleshoot an issue in development.

This was helpful for me. So maybe we can add these to the message:

  • Mention Puma (e.g. "like Unicorn or Puma")
  • Add "Consider turning the number of workers to one (1) or using a different server in development."

I can make a quick PR if this sounds good.

@gsamokovarov
Copy link
Collaborator Author

@chibicode Sure, go ahead.

@chibicode
Copy link

@gsamokovarov done! #153

@gsamokovarov gsamokovarov deleted the revamp-error-messages branch March 17, 2017 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants