I see problems with the current caching code in ss_get_mysql_stats.php:
- it uses mysql for locking, and this actually shows up as a problem
sometimes in slow query reports, using too many connections, etc.
- it uses the same lock token for all invocations, so getting stats for
server A will block on server B, which is unnecessary
- it uses exclusive locking, when it could use shared locking (and escalate
to exclusive if the cache file needs to be refreshed)
I think it would be much better to use flock() on the cache file itself.
Original issue reported on code.google.com by baron.schwartz on 24 Oct 2009 at 11:56
Original issue reported on code.google.com by
baron.schwartz
on 24 Oct 2009 at 11:56