SamSaffron / MiniProfiler

A simple but effective mini-profiler for ASP.NET MVC, ASP.NET and Ruby.
http://miniprofiler.com
1.05k stars 221 forks source link

Profiling results pile up in production #181

Open semaperepelitsa opened 11 years ago

semaperepelitsa commented 11 years ago

MiniProfiler works great on my development machine. However, on our production server the old profiling results never disappear. You reload a page and you see all previous results plus a new one. The results appear in a random order.

I cannot reproduce the issue locally. Also, the storage type doesn't matter, I have tried both file and memcache (memory store wouldn't work in our multi-process server). While digging through your library, I have tried a method for removing a result manually in Rails console and it did indeed disappear after page reload.

myip = "..."
ids = Rails.cache.read("MPMemcacheStore-#{myip}-v")
mp = Rack::MiniProfiler.config.storage_instance
mp.set_viewed(myip, ids.last)

Do you have any ideas or suggestions to help debug this issue?