Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7884859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:54:48+00:00 2026-06-03T04:54:48+00:00

I have a server in my room with a duo-core processor and basic internet

  • 0

I have a server in my room with a duo-core processor and basic internet (nothing fancy)

I’m running ubuntu 11.04 and I’m running a php script from the crontab.

0 3 * * * php back_up_to_s3.php

This script takes about 20-30 minutes to run. It works fine when run from the crontab, however if I run it at the same time as other scripts that take about 5-10 minutes to run.

0 3 * * * php back_up_to_s3.php
0 3 * * * php do_this.php
0 3 * * * php do_that.php

It doesn’t finish. My guess is that it’s timing out. Here is the source of back_up_to_s3.php

include('Zend/Service/Amazon/S3.php');
include("connect_to_database.php");

$my_aws_key = '******';
$my_aws_secret_key = '******';
Zend_Service_Amazon_S3::setKeys($my_aws_key, $my_aws_secret_key);
$s3 = new Zend_Service_Amazon_S3();


$fileName = exec("date +'%m_%d_%y'") . '.tar';

$filePath ="/home/me/temp_db_backups/$fileName";

exec("mysqldump -h localhost -u root -ppassword DATABASE_NAME > $filePath");

$s3->putObject('myBucket/' . $fileName, file_get_contents($filePath),
    array(Zend_Service_Amazon_S3::S3_ACL_HEADER =>
            Zend_Service_Amazon_S3::S3_ACL_PRIVATE,            
            Zend_Service_Amazon_S3::S3_CONTENT_TYPE_HEADER =>
            'audio/mpeg'
));                   

unlink($filePath);

I know the script doesn’t finish because the tarred backup does not appear in my s3 bucket. However the tar file gets created and is still in my /home/me/temp_db_backups so I know the script terminates while $s3-putObject executes.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:54:50+00:00Added an answer on June 3, 2026 at 4:54 am

    Hello LedZeppelin (doubt if I will every get to say that 🙂
    Instead of guessing what could be happening, redirect the output to a log file and you will know for sure

    0 3 * * * php back_up_to_s3.php >/tmp/backup_cronoutput 2>&1
    0 3 * * * php do_this.php >/tmp/do_this_cronoutput 2>&1
    0 3 * * * php do_that.php >/tmp/do_that_cronoutput 2>&1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My server have default php version of 4, so when I run some script
I have a e-radio into my site The uploading from audio room to server
I have a server where I store data from Mac A and Mac B.
We have a server application that we want to restrict non-users from triggerring it
I have development server setup running Adobe Coldfusion8 (.war install) on top of Caucho
I have a server application receiving messages from a JMS queue. And client applications
So I'm running a Java server and in one class I have a static
I have been experimenting with ways to read data from a SQL server as
I have an online chat room that uses jQuery/Ajax for requesting data from the
I have a long polling request on my page. The script on the server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.