Uploaded image for project: 'Qt Cloud'
  1. Qt Cloud
  2. CLOUD-69

Upgrade server to use FastAPI or other similar framework

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • None
    • None
    • Backend
    • None
    • Gemini sprint 3, Gemini sprint 4

    Description

      Why? Performance issues and quite some times, the server gets stalled.

       

      SOme tracebacks: 

       

      
      t=2022-02-04T11:02:21+0200 lvl=eror msg="heartbeat timeout, terminating session" obj=csess id=78d85085a103 clientid=0b47c9b21d9a11563fd80e6ff9de406e
      ----------------------------------------
      Exception occurred during processing of request from ('127.0.0.1', 50553)
      t=2022-02-04T11:02:21+0200 lvl=eror msg="session closed, starting reconnect loop" obj=csess id=d52d126ea60e err="read tcp [2001:14bb:cd:bd2a:15ca:ac9e:1d83:16de]:50151->[2a05:d014:21b:8e00::6e74:0]:443: wsarecv: An existing connection was forcibly closed by the remote host."
      t=2022-02-04T12:01:54+0200 lvl=eror msg="heartbeat timeout, terminating session" obj=csess id=ac74243ffcc8 clientid=0b47c9b21d9a11563fd80e6ff9de406e
      t=2022-02-04T12:01:54+0200 lvl=eror msg="session closed, starting reconnect loop" obj=csess id=d52d126ea60e err="read tcp [2001:14bb:cd:bd2a:15ca:ac9e:1d83:16de]:59385->[2a05:d014:21b:8e02::6e74:2]:443: wsarecv: An existing connection was forcibly closed by the remote host."
      t=2022-02-04T12:21:28+0200 lvl=eror msg="session closed, starting reconnect loop" obj=csess id=d52d126ea60e err="read tcp [2001:14bb:cd:bd2a:15ca:ac9e:1d83:16de]:60481->[2a05:d014:21b:8e01::6e74:1]:443: wsarecv: An existing connection was forcibly closed by the remote host."
      t=2022-02-04T12:21:28+0200 lvl=eror msg="heartbeat timeout, terminating session" obj=csess id=27c67a040226 clientid=0b47c9b21d9a11563fd80e6ff9de406e
      t=2022-02-04T12:21:28+0200 lvl=eror msg="failed to reconnect session" obj=csess id=d52d126ea60e err="dial tcp: lookup tunnel.eu.ngrok.com: no such host"
      Traceback (most recent call last):
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 316, in _handle_request_noblock
          self.process_request(request, client_address)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 347, in process_request
          self.finish_request(request, client_address)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 360, in finish_request
          self.RequestHandlerClass(request, client_address, self)
        File "c:\users\asshakun\documents\gitprojects\qtcloud\src\qtci\modules\_server.py", line 41, in __init__
          super().__init__(*args, directory=assets_dir, **kwargs)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 653, in __init__
          super().__init__(*args, **kwargs)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 747, in __init__
          self.handle()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 427, in handle
          self.handle_one_request()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 415, in handle_one_request
          method()
        File "c:\users\asshakun\documents\gitprojects\qtcloud\src\qtci\modules\_server.py", line 152, in do_POST
          self.set_response_headers()
        File "c:\users\asshakun\documents\gitprojects\qtcloud\src\qtci\modules\_server.py", line 46, in set_response_headers
          self.end_headers ()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 529, in end_headers
          self.flush_headers()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 533, in flush_headers
          self.wfile.write(b"".join(self._headers_buffer))
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 826, in write
          self._sock.sendall(b)
      ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
      ----------------------------------------
      127.0.0.1 - - [04/Feb/2022 13:06:47] "POST /gitlab-incoming-3574 HTTP/1.1" 200 -
      ----------------------------------------
      Exception occurred during processing of request from ('127.0.0.1', 50555)
      Traceback (most recent call last):
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 316, in _handle_request_noblock
          self.process_request(request, client_address)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 347, in process_request
          self.finish_request(request, client_address)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 360, in finish_request
          self.RequestHandlerClass(request, client_address, self)
        File "c:\users\asshakun\documents\gitprojects\qtcloud\src\qtci\modules\_server.py", line 41, in __init__
          super().__init__(*args, directory=assets_dir, **kwargs)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 653, in __init__
          super().__init__(*args, **kwargs)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 747, in __init__
          self.handle()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 427, in handle
          self.handle_one_request()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 415, in handle_one_request
          method()
        File "c:\users\asshakun\documents\gitprojects\qtcloud\src\qtci\modules\_server.py", line 152, in do_POST
          self.set_response_headers()
        File "c:\users\asshakun\documents\gitprojects\qtcloud\src\qtci\modules\_server.py", line 46, in set_response_headers
          self.end_headers ()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 529, in end_headers
          self.flush_headers()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 533, in flush_headers
          self.wfile.write(b"".join(self._headers_buffer))
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 826, in write
          self._sock.sendall(b)
      ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
      ----------------------------------------
      127.0.0.1 - - [04/Feb/2022 13:06:47] "POST /gitlab-incoming-3574 HTTP/1.1" 200 -
      ----------------------------------------
      Exception occurred during processing of request from ('127.0.0.1', 50561)
      Traceback (most recent call last):
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 316, in _handle_request_noblock
          self.process_request(request, client_address)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 347, in process_request
          self.finish_request(request, client_address)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 360, in finish_request
          self.RequestHandlerClass(request, client_address, self)
        File "c:\users\asshakun\documents\gitprojects\qtcloud\src\qtci\modules\_server.py", line 41, in __init__
          super().__init__(*args, directory=assets_dir, **kwargs)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 653, in __init__
          super().__init__(*args, **kwargs)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 747, in __init__
          self.handle()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 427, in handle
          self.handle_one_request()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 415, in handle_one_request
          method()
        File "c:\users\asshakun\documents\gitprojects\qtcloud\src\qtci\modules\_server.py", line 152, in do_POST
          self.set_response_headers()
        File "c:\users\asshakun\documents\gitprojects\qtcloud\src\qtci\modules\_server.py", line 46, in set_response_headers
          self.end_headers ()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 529, in end_headers
          self.flush_headers()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 533, in flush_headers
          self.wfile.write(b"".join(self._headers_buffer))
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 826, in write
          self._sock.sendall(b)
      ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
      ----------------------------------------
      127.0.0.1 - - [04/Feb/2022 13:06:47] "POST /gitlab-incoming-3574 HTTP/1.1" 200 -
      ----------------------------------------
      Exception occurred during processing of request from ('127.0.0.1', 50563)
      Traceback (most recent call last):
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 316, in _handle_request_noblock
          self.process_request(request, client_address)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 347, in process_request
          self.finish_request(request, client_address)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 360, in finish_request
          self.RequestHandlerClass(request, client_address, self)
        File "c:\users\asshakun\documents\gitprojects\qtcloud\src\qtci\modules\_server.py", line 41, in __init__
          super().__init__(*args, directory=assets_dir, **kwargs)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 653, in __init__
          super().__init__(*args, **kwargs)
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 747, in __init__
          self.handle()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 427, in handle
          self.handle_one_request()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 415, in handle_one_request
          method()
        File "c:\users\asshakun\documents\gitprojects\qtcloud\src\qtci\modules\_server.py", line 152, in do_POST
          self.set_response_headers()
        File "c:\users\asshakun\documents\gitprojects\qtcloud\src\qtci\modules\_server.py", line 46, in set_response_headers
          self.end_headers ()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 529, in end_headers
          self.flush_headers()
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\http\server.py", line 533, in flush_headers
          self.wfile.write(b"".join(self._headers_buffer))
        File "C:\Users\asshakun\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 826, in write
          self._sock.sendall(b)
      ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine 

      Attachments

        Issue Links

          Activity

            People

              as33ms Aseem Shakuntal
              as33ms Aseem Shakuntal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: