When uwsgi deploys Django applications, the port on which requests is used to obtain data cannot get the data.

api, developed using Django+DRF has two interfaces that crawl data returns using requests. The API returns data normally when testing with the development server that comes with Django, and all other APIs are normal after the server is deployed with Nginx+uwsgi. Only the two APIs that use requests always return empty data, the background records do not report errors, and uwsgi also enables python multithreading support.

Jul.04,2021

tried many methods, but could not solve it. We can only write the crawler as a separate script, execute it with os, and read the processing result

.
Menu