Rails app logging duplicate requests

前端 未结 8 2181
感情败类
感情败类 2021-01-04 19:37

I have a Rails app that is generating duplicate requests for every request in development. The app is running Rails 2.3.5 with my primary development machine running Ubuntu

8条回答
  •  孤城傲影
    2021-01-04 19:52

    When people come to this question from google it's important they disambiguate their problem between duplicate logs that look like this:

    A
    A
    B
    B
    C
    C
    

    From duplicate logs that look like this:

    A
    B
    C
    
    A
    B
    C
    

    The former is likely from duplicate LOGGING. The later is likely from duplicate REQUESTS. In the case it is the latter as shown by the Question Asker (OP), you should strongly consider @www's answer of hunting down a or a similar self-referential url tag. I spent hours trying to figure out why my application was appearing to make two duplicate requests, and after reading @www's answer (or @aelor's on Double console output?), I found

    %link{href: "", rel: "shortcut icon"}/
    

    in my code! It was causing every page of my production app to be double rendering!!!! So bad for performance and so annoying!

提交回复
热议问题