4 Replies - 273 Views - Last Post: 26 July 2019 - 02:31 PM

#1 ArtificialSoldier   User is online

  • D.I.C Lover
  • member icon

Reputation: 2410
  • View blog
  • Posts: 7,369
  • Joined: 15-January 14

Uploads failing

Posted 12 July 2019 - 12:13 PM

I've got an odd situation that I'm having a hard time troubleshooting. On one of our servers, trying to upload files over a certain size seems to be failing in the browser but I don't have any other indication of failure. Here's several attempts with a file that is about 28.5MB:

Posted Image

Note the sizes are different, and the browser indicates no response from the server (there's no response code). Chrome says the request fails. Here's another batch with a 37MB file:

Posted Image

The upload sizes are about the same even though the file is much larger. Each of these uploads takes about 20 seconds or so.

I also noticed that some requests say they are over SSL, and others don't. I'm literally just pressing the Submit button here over and over without reloading or anything else.

Here's an entry from the Apache log, the second entry is the upload which I can tell because it's our IP, that's my browser, and the timestamp is 20 seconds prior to the previous entry:

1.1.1.1 - - [12/Jul/2019:11:24:10 -0700] "GET /resources/44457/mobile/6IDMaALnpd3_80_P_0_0/>/>_778_1245_DX1220_DY1220_CX347_CY556.png HTTP/1.1" 200 265245 "https://domain.com/resources/44457/index_lms_html5.html" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36"
2.2.2.2 - - [12/Jul/2019:11:23:50 -0700] "POST /io.php HTTP/1.1" 200 57 "https://domain.com/index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0"

Apache claims that it sent a 200 response, but the browser doesn't show a response at all.

Does anyone have any suggestions?

Is This A Good Question/Topic? 0
  • +

Replies To: Uploads failing

#2 Martyr2   User is offline

  • Programming Theoretician
  • member icon

Reputation: 5485
  • View blog
  • Posts: 14,448
  • Joined: 18-April 07

Re: Uploads failing

Posted 12 July 2019 - 04:51 PM

Have you run any tests on a different browser? This type of test would tell you if it is the browser or the server. If it works on another browser fine, then you can see if perhaps some kind of caching or resuming or something is going on in the browser.
Was This Post Helpful? 0
  • +
  • -

#3 ArtificialSoldier   User is online

  • D.I.C Lover
  • member icon

Reputation: 2410
  • View blog
  • Posts: 7,369
  • Joined: 15-January 14

Re: Uploads failing

Posted 12 July 2019 - 05:57 PM

Firefox and Chrome are similar, the major difference is that in the Chrome developer tools the request is shown in red and the status says "(failed)". In Firefox it just looks like the image above. Interestingly, in IE 11 the request does end up showing a 200 response in the dev tools, but with no content type, and the received bytes does indicate 57 bytes just like in the Apache log, but it claims that there is no response body. Also, in IE 11, our application actually responds with our "the request failed" dialog box, which does not get triggered in Chrome or Firefox.

I've got something else to look at, though. If a request fails and we show the dialog box we send the error object to the console, and it looks like I do have an error from our application, which might indicate that the request was larger than PHP is configured to handle (it should be set at 400MB, so I'll need to check). That's probably the 57 bytes coming back, but I'm stumped as to why Chrome and Firefox are behaving like they are.

OK, that's not the problem, PHP configured max upload size is 600M and post max size is 610M. Even verified that with a phpinfo page in the same directory. So now I'm more confused.

That io.php file is the main endpoint for all of the ajax requests, one of the variables it sends is "page_mode" to tell it which file to include to do most of the work, and the error is unknown page mode. In every browser I cannot see any post data, I don't know if that's a bug with the developer tools or if it's actually sending off a 26MB request that somehow doesn't have a request body. If there is actually no post data then unknown page mode makes sense, but what's with the 26MB request if there's not a request body? All any browser will show me is the request headers, and IE also shows the response headers, it's the only browser that even acknowledges a server response. Maybe I need to fire up a traffic analyzer instead of the built in dev tools. The fact that IE is showing the error object in the console (the message of which comes from a JSON object sent by the server), but still claims no response body makes my trust in the dev tools wane a little bit.
Was This Post Helpful? 0
  • +
  • -

#4 ArtificialSoldier   User is online

  • D.I.C Lover
  • member icon

Reputation: 2410
  • View blog
  • Posts: 7,369
  • Joined: 15-January 14

Re: Uploads failing

Posted 26 July 2019 - 09:13 AM

Wireshark tells me that the server is sending a flood of RST packets. I'm still investigating though, a complete server reboot didn't have any effect other than making me marvel at the fact that it took 25 minutes just to shut down. I'm not sure what's different about this one client and server versus all of the rest.
Was This Post Helpful? 0
  • +
  • -

#5 ArtificialSoldier   User is online

  • D.I.C Lover
  • member icon

Reputation: 2410
  • View blog
  • Posts: 7,369
  • Joined: 15-January 14

Re: Uploads failing

Posted 26 July 2019 - 02:31 PM

The culprit was mod_reqtimeout killing uploads after 20 seconds. It sounds like there's an issue with the module or configuration that cPanel was aware of.

Specifically:

https://bz.apache.or...ug.cgi?id=63325

The default turned out to not be the default.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1