ruby-on-rails - Why does the server always fail to upload files using nginx?
迷茫
迷茫 2017-05-16 17:30:21
0
1
962

The specific situation is:
I have an app (rails passenger nginx), which provides an upload function for users to upload files.
I deployed it to the server and tested it

1: It’s OK to upload files using my computer

2: It’s OK to upload files using the computer in my company

3: When providing it to collaborators, the page link is interrupted when the file is uploaded halfway.

4: The collaborator used his company’s computer to upload, but the link was interrupted halfway through the upload.

5: Collaborators can sometimes upload (the probability is very small) most of the time the page is broken after uploading half way

I logged in to the server and checked the logs and found that nothing abnormal happened.

ps: The collaborator has redone the system before (it was able to upload before the system was built). He used the Firefox browser and IE browser, but failed
I guess there is a problem with the collaborator's network. There is also a possibility that there is a problem with my nginx configuration.
At present, I have not found a suitable entry point to investigate this problem. I will post the problem first and hope that everyone can help with ideas

The following is my nginx configuration file:

include       mime.types;
default_type  application/octet-stream;
log_format  simple '$remote_addr - [$time_local] "$request" $status $body_bytes_sent';
log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';

#access_log  logs/access.log  main;

sendfile        on;
#tcp_nopush     on;

#keepalive_timeout  0;
keepalive_timeout  180;


include /opt/nginx/conf/sites-enabled/*;
迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
给我你的怀抱

First of all, what I want to ask is, are the files you and your collaborators uploaded for testing the same file? Also, are the collaborators tested within a network?

You can check it like this:
First, let your test upload files be the same file. Basically, it is best if the size is the same and the type is the same. You can give the successful file to the collaborator to see if he can do it.
Because this can troubleshoot restrictions caused by different file types or sizes

If there is no problem in the first check, then look at the problem of LAN and WAN. If it is due to transmission timeout (some timeout restrictions and programs without retry mechanism), it may also be caused. Therefore, it is recommended to use small files for testing

Furthermore, I would like to ask, was this upload program written by the company’s own programmers? If so, you can ask them to conduct a debug investigation.
PS: Usually it doesn’t have much to do with reinstalling the system. If it has something to do with the browser, this may have a little impact. It mainly depends on how the upload program is written.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template