A
A
Alexey2020-03-16 16:43:11
Nginx
Alexey, 2020-03-16 16:43:11

What is the http request time spent on?

I don't understand what's going on!
Requests to the web server are processed very slowly. Initial data: Ubuntu server + Nginx + UWSGI + Python
Example. The browser sends a request, the response comes in 723 ms. I look at the nginx logs:

request_time = 0.728
upstream_response_time = 0.723

Those. nginx processed the request "instantly", and all 723 ms went to be processed by the uwsgi server.
I look at the application code that processes the request. In the query execution code:
- one line giving an SQL query
- several lines of its processing before returning
the SQL takes 66 ms
Processing of the result - 0.1 ms
I.e. the code worked for 66 ms.
I look at the uwsgi log. It says: generated 53 bytes in 722 msecs
What does it mean that 722 - 66 = uwsgi overhead? Kapets! How to find out exactly where, and how to deal with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Priluzkiy, 2020-03-16
@Oxyd

It can help, but here they swear at him.
Well, in general, a query in Google "uwsgi performance tuning" gives a certain number of results .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question