Giter VIP home page Giter VIP logo

kiosk-data-processing's People

Contributors

willgraf avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kiosk-data-processing's Issues

Tornado Client hits StreamClosedException

Flask is by default blocking HTTP server. The client calling the DP API is using tornado to quickly get all responses for multiple images. When sending multiple requests with tornado, the following error gets hit:

[ERROR]:[tornado.application]: Uncaught exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/tornado/http1connection.py", line 222, in _read_message
    yield body_future
  File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/usr/local/lib/python3.6/site-packages/tornado/http1connection.py", line 589, in _read_fixed_body
    min(self.params.chunk_size, content_length), partial=True)
  File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
tornado.iostream.StreamClosedError: Stream is closed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/tornado/http1connection.py", line 261, in _read_message
    delegate.on_connection_close()
  File "/usr/local/lib/python3.6/site-packages/tornado/http1connection.py", line 683, in on_connection_close
    return self._delegate.on_connection_close()
  File "/usr/local/lib/python3.6/site-packages/tornado/simple_httpclient.py", line 472, in on_connection_close
    raise self.stream.error
  File "/usr/local/lib/python3.6/site-packages/tornado/iostream.py", line 945, in _read_to_buffer
    bytes_read = self.read_from_fd(buf)
  File "/usr/local/lib/python3.6/site-packages/tornado/iostream.py", line 1238, in read_from_fd
    return self.socket.recv_into(buf)
ConnectionResetError: [Errno 104] Connection reset by peer

This is an async vs sync issue I believe. StackOverflow leads me to think that using another HTTP Server besides the default WSGI would be helpful (and probably a best practice for production deployment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.