tornado
tornado copied to clipboard
[StaticFileHandler] get static file slowly
Hello! Why sometimes it is very slow for me to get static files locally
I used the command
wget localhost:30080/static/xx.js
But when I kill the process and restart it, everything will be ok
It's hard to say without any detail about what you're doing, but my guess is that you're doing something that is blocking the IOLoop thread. Try setting the environment variable PYTHONASYNCIODEBUG=1
and see if the logs show that you have any callbacks running for too long.
It's hard to say without any detail about what you're doing, but my guess is that you're doing something that is blocking the IOLoop thread. Try setting the environment variable
PYTHONASYNCIODEBUG=1
and see if the logs show that you have any callbacks running for too long.
Thank you for your answer! Our service is jupyter lab, which is based on tornado. Sometimes users will not be able to access his lab service. Later, we found that the download of js file (23MB) is too slow. If you kill the lab process and restart it, you can quickly enter the service, otherwise will wait 10-20 minutes, but this problem does not occur frequently.
I don't know of anything in Tornado that could cause a file download to take 20 minutes, unless maybe you're running some massive computation on the main thread (I don't know how/whether jupyter isolates its main thread from notebook code). PYTHONASYNCIODEBUG would show that. Otherwise you'll need to start looking at thread stacks, tcpdumps, etc to try and figure out what's going on.
Closing due to inactivity