Why I grep my code for TODO before committing
Dealing with a production incident right now, in which our metrics for requests received were not adding-up against those for various responses. Which didn't make a lot of sense to us. I mean, even if the server was erroring-out, we should see 5xxs, right?
I was eventually reduced to spelunking through our chosen HTTP server's codebase (this service is using CherryPy– I know, I know, not my service; I don't even write Python if I can help it), where I found this gem:
def process_conn(self, conn): """Process an incoming HTTPConnection.""" try: self.requests.put(conn) except queue.Full: # Just drop the conn. TODO: write 503 back? conn.close()