title: Celery async_result.get() hangs waiting for result even after celery worker has completed the task
body: <p>I have a long running celery task running on remote host. After completion the result get() method is stuck waiting for result from the celery worker.</p>
  <p><strong>Rabbitmq</strong> is used as message broker and <strong>redis</strong> is used as backend.</p>
  <p>I am calling <code>apply_async()</code> from flask, the job is submitted to celery worker on remote windows host.
  Celery worker completes its task successfully printing
  <code>Task test[93a4d8a9-b6b9-4a54-8d65-365584ecba9d] succeeded in 9828.842999999993s</code></p>
  <p>But the result <code>get()</code> method waits forever.</p>
  <p>On celery broker side, I have mentioned visibility timeout as follows. Here app refers to celery instance.</p>
  <pre><code>app.conf.broker_transport_options = {&quot;visibility_timeout&quot;: 14400, &quot;max_retries&quot;: 3, &quot;interval_start&quot;: 0, &quot;interval_step&quot;: 0.2, &quot;interval_max&quot;: 0.5}
  </code></pre>
  <p>On Celery client side inside get method I have mentioned timeout as follows:</p>
  <pre><code>doors_res = doors_res_obj.get(timeout=14400)
  </code></pre>
  <p>When timeout is not mentioned in get() of celery result, the application keeps on waiting for result in hang state.</p>
  <p>With addition of timeout to get(), the connection reset error occurs. Error logs are as follows:-</p>
  <pre><code>
  Traceback (most recent call last):
    File &quot;C:\Users\venugopal.venkatesh\.virtualenvs\flask-2pC1ju1x\lib\site-packages\flask\app.py&quot;, line 1950, in full_dispatch_request
      rv = self.dispatch_request()
    File &quot;C:\Users\venugopal.venkatesh\.virtualenvs\flask-2pC1ju1x\lib\site-packages\flask\app.py&quot;, line 1936, in dispatch_request   
      return self.view_functions[rule.endpoint](**req.view_args)
    File &quot;C:\Users\venugopal.venkatesh\.virtualenvs\flask-2pC1ju1x\lib\site-packages\flask_restplus\api.py&quot;, line 325, in wrapper    
      resp = resource(*args, **kwargs)
    File &quot;C:\Users\venugopal.venkatesh\.virtualenvs\flask-2pC1ju1x\lib\site-packages\flask\views.py&quot;, line 89, in view
      return self.dispatch_request(*args, **kwargs)
    File &quot;C:\Users\venugopal.venkatesh\.virtualenvs\flask-2pC1ju1x\lib\site-packages\flask_restplus\resource.py&quot;, line 44, in dispatch_request
      resp = meth(*args, **kwargs)
    File &quot;C:\Users\venugopal.venkatesh\OneDrive - Veoneer\Documents\sprint35\Testing_with_Docker_env\flask\src\application\routes.py&quot;, line 89, in wrap
      return f(*args, **kwargs)
    File &quot;C:\Users\venugopal.venkatesh\OneDrive - Veoneer\Documents\sprint35\Testing_with_Docker_env\flask\src\db\__init__.py&quot;, line 
  280, in wrap
      return f(*args, **kwargs)
    File &quot;C:\Users\venugopal.venkatesh\OneDrive - Veoneer\Documents\sprint35\Testing_with_Docker_env\flask\src\doors\routes.py&quot;, line 127, in post
      abort(503, ex)
    File &quot;C:\Users\venugopal.venkatesh\.virtualenvs\flask-2pC1ju1x\lib\site-packages\flask_restplus\errors.py&quot;, line 31, in abort    
      flask.abort(code)
    File &quot;C:\Users\venugopal.venkatesh\.virtualenvs\flask-2pC1ju1x\lib\site-packages\werkzeug\exceptions.py&quot;, line 772, in abort     
      return _aborter(status, *args, **kwargs)
    File &quot;C:\Users\venugopal.venkatesh\.virtualenvs\flask-2pC1ju1x\lib\site-packages\werkzeug\exceptions.py&quot;, line 753, in __call__  
      raise self.mapping[code](*args, **kwargs)
  werkzeug.exceptions.ServiceUnavailable: 503 Service Unavailable: The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
  2020-09-13 14:32:49,467 WARNING MainProcess - {'message': '[WinError 10054] An existing connection was forcibly closed by the remote host'}
  **WARNING:debuglog:{'message': '[WinError 10054] An existing connection was forcibly closed by the remote host'}**
  </code></pre>
  <p>Any pointers on how to fix this issue?</p>