How to solve the problem that uploading files to nginx server is very slow?

Server

nginx+PHP,,30M,2M

Local network

100M3-4M,KbKB

PHP code for receiving uploaded files:

 $post_data = file_get_contents("php://input");

I only know that PHP.ini and nginx.conf set the size of uploading files, and there is no limit on the rate of uploading files, and my code does not set the uploading rate. I would like to ask all the gods, what is the cause of this? thank you.


Why should I use file_get_contents? No frame? Then upload directly with the html form, and use $_ FILES in the background to see how fast it is


this is generally a bandwidth problem, because NGINX is received at one time before it is given to php-fpm, so it will not cause blocking of php. Just increase the bandwidth, either on the server side or on the client side.

Menu