[wp-trac] [WordPress Trac] #28616: ftp_fput should have a retry threshold
WordPress Trac
noreply at wordpress.org
Mon Jun 23 18:27:08 UTC 2014
#28616: ftp_fput should have a retry threshold
----------------------------+-----------------------------
Reporter: runderwo | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Filesystem API | Version: trunk
Severity: normal | Keywords:
Focuses: |
----------------------------+-----------------------------
In class-wp-filesystem-ftpext.php in put_contents(), ftp_fput() is called
to transfer a file to the FTP server.
The first problem is that warnings are suppressed, so the user never knows
that this is the location where something went wrong.
The broader problem is that a single transient network failure between the
web server and FTP server causes this call to fail. Well, that would be
not a big problem if the user's operation were a single call. However,
this function is used by Wordpress auto-upgrade when direct file access
fails. For each file in the Wordpress distribution, this function is
called to transfer it to the FTP server.
As the default Wordpress distribution gets more and more bloated, the
number of calls increases proportionally, and the likelihood of at least
one FTP transaction failing increases. A single failure aborts the entire
Wordpress upgrade. It seems reasonable to at least retry up to (say)
three times the ftp_fput() call before returning an error to the higher
level and aborting a large process such as Wordpress upgrade which is
using FTP as backing for the filesystem abstraction layer.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28616>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list