Tornado requests the same url blocking

paste the code first

import time

from tornado.gen import coroutine
from tornado.httpclient import AsyncHTTPClient
from tornado.ioloop import IOLoop
from tornado.web import Application, RequestHandler


class MainHandler(RequestHandler):

    @coroutine
    def get(self):
        client = AsyncHTTPClient()
        urls = ["http://www.baidu.com"] * 20
        start = time.time()
        yield [client.fetch(url) for url in urls]
        print(time.time() - start)


def make_app():
    return Application([(r"/", MainHandler), ])


if __name__ == "__main__":
    app = make_app()
    app.listen(8888)
    IOLoop.current().start()

I requested the same link 50 times in the http://localhost:8888/ get method through a browser, but found that the time it took was the sum of all the requests. Baidu found that requesting the same link would block, but did not find a solution.

tried to add different parameters to the link, but it was still blocked.

do you have a solution?

Jan.24,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9acaf-1805.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9acaf-1805.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?