Rob Sutherland
Rob Sutherland

Reputation: 1209

Unicorn log showing 2 entries for every hit

This is the unicorn.log from running unicorn on my dev machine, but the server is doing the same thing. For every request getting pushed to unicorn there are two log entries. Locally the public folder is being passed through unicorn, but on the server only the app requests are, but both still show double entries.

Small app so I haven't notice any real performance problems, but it seems like something isn't right.

Any ideas?

I, [2012-01-14T10:54:09.089535 #34573]  INFO -- : listening on addr=0.0.0.0:8080 fd=3
I, [2012-01-14T10:54:09.090163 #34573]  INFO -- : worker=0 spawning...
I, [2012-01-14T10:54:09.092941 #34573]  INFO -- : master process ready
I, [2012-01-14T10:54:09.095054 #34597]  INFO -- : worker=0 spawned pid=34597
I, [2012-01-14T10:54:09.095875 #34597]  INFO -- : Refreshing Gem list
I, [2012-01-14T10:54:19.744259 #34597]  INFO -- : worker=0 ready
127.0.0.1 - - [14/Jan/2012 10:54:26] "GET /page/url HTTP/1.1" 200 29950 0.3179
127.0.0.1 - - [14/Jan/2012 10:54:26] "GET /page/url HTTP/1.1" 200 29950 0.5209
127.0.0.1 - - [14/Jan/2012 10:54:26] "GET /ui/base.css HTTP/1.1" 200 33178 0.0670
127.0.0.1 - - [14/Jan/2012 10:54:26] "GET /ui/base.css HTTP/1.1" 200 33178 0.0716

Upvotes: 1

Views: 293

Answers (1)

Rob Sutherland
Rob Sutherland

Reputation: 1209

Found the problem with help from someone on the Sinatra forum.

Sinatra and Rack were both writing to the log. Disabled the Rack Logging and now only getting one entry from Sinatra.

Upvotes: 2

Related Questions