Support

Akeeba Backup for Joomla!

#28622 Amazon S3 upload fails intermittently: Empty reply from server

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by on Sunday, 19 November 2017 17:17 CST

michael_cgla
Description of my issue:

I have nightly scheduled backups via a cron job. These are configured to upload to S3 and then remove the files from the server. However, in the last few weeks, this part has begun to fail intermittently (perhaps 1/3 of the time), resulting in my server getting clogged up with old backup files. (On two occasions this led to the website crashing. I have since put in place alerts so that I can manually move the files before it gets that far!)

The error message I am seeing in the log files is:
Upload cannot proceed. Amazon S3 returned an error message: 0 :: Akeeba\Engine\Postproc\Connector\S3v4\Connector::uploadMultipart(): [52] Empty reply from server \n  \n Debug info: \n


By the way, uploading to S3 via this automated mechanism seems very slow — successful backups seem to spend about 10 minutes uploading two 2GB files. Conversely, when I upload the same files using the AWS CLI, they take about 30 seconds each (one minute total). I'm not seeing any indication that a timeout is occurring, however.

I'm using a VPS hosted by Media Temple.

tampe125
Akeeba Staff
Hello,

the error message you reported means that Amazon returned an error, but he didn't say what happened :(
Sadly sometimes it happens, we copy the error message verbatim, so there's nothing we can do. Usually this gets resolved automatically after few hours.
We saw that there's some kind of link with the archive size: I'd strongly suggest you to set a part size of 100Mb and try again. With large files we have to chunk the original archive and upload it piece by piece. Sometimes with large files this system got clogged, because Amazon can't process the chunk in time. Please try with a lower part size, Akeeba will produce fewer chunks and it should lower the error rate caused by Amazon servers.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

michael_cgla
OK, thanks Davide. If this issue persists much longer I will try that. I'm reluctant to do so too soon, since having each backup split into 40 files would make working with them much harder. (For example, if I go to the S3 Console, I'll no longer be able to see at a glance whether all backups from the past week are present, and if I want to copy across the files to my test server using the AWS CLI, I'll have to write a bash script to handle running the 40 commands necessary to copy them all across.)

Is it expected behavior that Akeeba Backup would take ~10x longer to copy the files than when I do so using the AWS CLI?

tampe125
Akeeba Staff
Just a couple of suggestions:
  1. First of all, you can tell Akeeba Backup to put the backups into a different folder, one for each day. In this way you'll simply have to look at the folders instead of the files. Further info here, under the section Directory
  2. If you want to restore a multipart backup hosted on Amazon S3, please use Kickstart Pro: you can tell him which archive you want to restore and he will automatically download all the parts


Regarding the speed: that's completely possible.
When you use the CLI, you harness the full power of your server: all the CPU, the bandwidth and I/O are used to download everything. You're achieving maximum speed.
On the other hand, Akeeba Backup is tied to your webserver (and Joomla) constrains. First of all, to avoid timeouts, we have to split the process in several page loads. This means:

  1. Your Apache Webserver has to spin a new thread (or reuse an existing one) to handle the connection
  2. PHP interpreter is fired up (compiling the code on the fly)
  3. A database connection is established by Joomla
  4. Joomla loads the session table (main bottleneck)
  5. Joomla includes all the plugins that are required (system etc etc)
  6. Finally Akeeba Backup has the chance to do its work

On top of this, a usual webserver impose some limits to the amount of resource that your site could use: CPU, RAM, I/O and bandwith.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!