[wp-trac] [WordPress Trac] #40445: Large file upload through XML-RPC fails with error 500

WordPress Trac noreply at wordpress.org
Fri Apr 14 11:38:16 UTC 2017


#40445: Large file upload through XML-RPC fails with error 500
--------------------------+-----------------------------
 Reporter:  avibrazil     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  XML-RPC       |    Version:  4.7.3
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 It fails through XML-RPC but succeeds through the web UI.
 File size is about 40MB and PHP upload limits are correct and higher than
 that.
 XML-RPC upload fails either through HTTP and HTTPS, either through IPv4 or
 IPv6.
 Using netstat in another terminal, I can see large amounts of bytes being
 transferred for a while.
 But it suddenly fails with error 500:
 {{{
 xmlrpc.client.ProtocolError: <ProtocolError for abstra.to/xmlrpc.php: 500
 Internal Server Error>
 }}}

 On the server side there is absolutely nothing on Apache error log, not a
 single char being logged, and just this on access log:

 {{{
 2804:14c:183:83ce:631c:9fb1:3797:93a7 - - [14/Apr/2017:03:43:15 -0700]
 "POST /xmlrpc.php HTTP/1.1" 500 3375 "-" "Python-xmlrpc/3.5"
 }}}

 Log says 3375 bytes but netstat shows a higher number of bytes being
 transferred for several minutes.
 XML-RPC upload of smaller files works — successfully tested with 12MB.

 I would investigate this as a typical network error but doesn't look like,
 since upload never fails when making this same transfer through the web
 UI, from same Linux client machine. I would also discard lack of RAM and
 lack of storage on the server because same file upload through web UI
 works.

 The server apparently receives the whole blob (it stays connected for
 several minutes) but apparently fails in some internal file operation
 after it finishes receiving it all.

 This wordpress site will be a podcast server and I'm automating
 publication and media uploading with a script that uses https://python-
 wordpress-xmlrpc.readthedocs.io/en/latest/

 Thank you in advance

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40445>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list