bdarnell / django-tornado-demo

Demo app for django and tornado in one process
219 stars 63 forks source link

request problem #9

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hello,

def main():
    tornado.options.parse_command_line()
    wsgi_app = tornado.wsgi.WSGIContainer(
        django.core.handlers.wsgi.WSGIHandler())

    application = Application([(r'/websocket/', planet_socket.WsDate),
                               ('.*', FallbackHandler, dict(fallback=wsgi_app)),
                               ],
                              **settings)

    print options.port
    server = tornado.httpserver.HTTPServer(application)
    server.listen(options.port)
    tornado.ioloop.IOLoop.current().start()

if __name__ == '__main__':
    main()

When we are running the project as above, We take the problems as below.

When a request starts(such as showing 10K records to the screen) all other requests are waiting until the first request is completed. Requests which are running on Web Socket are waiting for first request's completion. When a user starts the first request then all other users are waiting the first request's completion. Sample Project is here. How Can We fix this problems..

Do you have any idea ?

Thanks...

bdarnell commented 9 years ago

Answered on the mailing list