Skip to content

schneems/logging_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logging stops after a while (thread safety)

Database setup:

RAILS_ENV=production bin/rake db:create
RAILS_ENV=production bin/rake db:migrate

Run the server (threaded with Puma):

bin/rails s -e production

Using an ab concurrency of 1 works as expected:

ab -n 300 -c 1 http://localhost.dev:3000/

Specifying concurrent requests causes logging to halt before ab finishes:

ab -n 300 -c 6 http://localhost.dev:3000/

The issue happens with activerecord-session_store loaded.

Without rails_12factor it's necessary to use tail -f log/production.log, which does appear to work with an ab concurrency of 6.

I also tried using sqlite instead of pg but it was still working (sometimes?).

About

Sample application of logging failing in Rails 4.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published