Skip to content

Catch BrokenPipeError while sending response #209

@tykling

Description

@tykling
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 14039)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/socketserver.py", line 691, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.11/socketserver.py", line 361, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/lib/python3.11/socketserver.py", line 755, in __init__
    self.handle()
  File "/usr/local/lib/python3.11/http/server.py", line 436, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.11/http/server.py", line 424, in handle_one_request
    method()
  File "/usr/home/tykling/dns_exporter/src/dns_exporter/exporter.py", line 683, in do_GET
    self.send_metric_response(registry=self.registry, query=self.qs)
  File "/usr/home/tykling/dns_exporter/src/dns_exporter/exporter.py", line 728, in send_metric_response
    self.wfile.write(output)
  File "/usr/local/lib/python3.11/socketserver.py", line 834, in write
    self._sock.sendall(b)
BrokenPipeError: [Errno 32] Broken pipe
----------------------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions