Server returns response only when it receives a new request

941 views
Skip to first unread message

Mehdi Khlifi

unread,
Oct 23, 2020, 6:35:11 AM10/23/20
to Tornado Web Server
Hey,

I'm using Tornado behind Nginx inside Kubernetes pods, and I have this issue:
- Let's say I sent a request to the server, it processes it and I can see in the log that the request is finished, but I can ONLY get/see a response if the server receives a new request (Not necessarily to the service), it could be any request.

What could be causing this?

Ben Darnell

unread,
Oct 25, 2020, 3:20:26 PM10/25/20
to Tornado Mailing List
That's very strange. One thing I can think of that could cause this is misuse of threads - if you call self.write or self.finish from another thread, the outgoing data may not be written until something else wakes up the IOLoop thread. Remember that IOLoop.add_callback is the only thread-safe method in Tornado (https://www.tornadoweb.org/en/stable/#threads-and-wsgi)

-Ben

--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-tornado/9d2b8b56-5cea-456b-88de-42367fa92bf8n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages