Exa-Networks / exaproxy

Performant Content Modifying Non-Caching Proxy [stable - accepting patches for bug fixes only]
Other
145 stars 36 forks source link

Statistics Hangs Server #40

Open h0tw1r3 opened 8 years ago

h0tw1r3 commented 8 years ago

Clicking statistics hangs the service. A few other links on the stats page do the same thing.

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/util/debug.py", line 71, in <module>
    execfile(sys.argv[0])
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/application.py", line 326, in <module>
    main()
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/application.py", line 296, in main
    Supervisor(configuration).run()
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/supervisor.py", line 270, in run
    status, events = self.reactor.run()
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/reactor/reactor.py", line 349, in run
    self.enactDecisions(decisions)
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/reactor/reactor.py", line 284, in enactDecisions
    response, length, status, buffer_change = self.content.getContent(client, command, decision)
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/reactor/content/manager.py", line 237, in getContent
    content = ('close', http('200', self.page.html(path)))
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/html/page.py", line 357, in html
    return menu(self._statistics())
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/html/page.py", line 128, in _statistics
    for k,v in sorted(self.monitor.statistics().items()):
TypeError: statistics() takes exactly 2 arguments (1 given)
thomas-mangin commented 8 years ago

Fixes the crash but does not return all the values: https://github.com/Exa-Networks/exaproxy/commit/2335c2311bd942eef5819ca91958a5f6c9cab98c