Question

s3cmd keeps getting killed

does anyone know a way to execute s3cmd tasks more reliable?

a large syncor setacl command gets interrupred regulary even its being executed on a droplet in the same datacenter.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

alexdo
Site Moderator
Site Moderator badge
July 5, 2024

Heya,

On top of what’s already been mentioned, s3cmd supports a --retries option that you can use to automatically retry failed operations.

You can use screen or tmux to run the command in a session that you can detach from and reattach to later. This ensures the command continues to run even if your connection to the server is interrupted.

Another approach will be to break the sync operation into smaller batches if possible. This reduces the chance of failure and makes it easier to retry smaller jobs.

Regards

KFSys
Site Moderator
Site Moderator badge
July 5, 2024

Heya,

It sounds to me like you don’t have enough RAM on your Droplet thus your processed are being killed.

For a short-term solution, you can try adding SWAP to see if that would help with the situation:

https://www.digitalocean.com/community/tutorial-collections/how-to-add-swap-space

Swap is a portion of hard drive storage that has been set aside for the operating system to temporarily store data that it can no longer hold in RAM. This lets you increase the amount of information that your server can keep in its working memory, with some caveats. The swap space on the hard drive will be used mainly when there is no longer sufficient space in RAM to hold in-use application data.

Bobby Iliev
Site Moderator
Site Moderator badge
July 4, 2024

Hey!

It is possible that your resources are being exhausted, mainly the RAM on the server.

To verify if this is indeed the case, what you could do is open 2 SSH sessions and run htop in one of the sessions and then start the s3cmd command in another session.

If indeed the RAM on the server is being exhausted, what you could do here is to upgrade your Droplet and add more RAM and CPU. Also, you could consider adding a SWAP file to have some extra buffer:

https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-20-04

Let me know how it goes!

- Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.