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 6790639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:44:55+00:00 2026-05-26T17:44:55+00:00

I have a PHP script that runs once a day, and it takes a

  • 0

I have a PHP script that runs once a day, and it takes a good 30 minutes to run (I think). Everything there is a safe & secure operation. I keep getting the 500 error after about 10~15 minutes of it. However I can’t see anything in the logs etc. so I’m a bit confused.

So far the things I set up as “unlimited” are:

  • max_execution_time
  • max_input_time
  • default_socket_timeout

Also set these to obscenely high numbers just for this section (the folder in which the script runs)

  • memory_limit
  • post_max_size

The nature of this script is a SOAP type API that imports thousands of rows of data from a 3rd party URL, puts them into a local MySQL table, and then downloads images attached with each and every row, so the amount of data is significant.

I’m trying to figure out what other PHP variables etc. I’m missing in order to get this to complete through the whole thing. Other PHP vars I have set:

  • display_errors = On
  • log_errors = On
  • error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING
  • error_log = “error_log”
  • 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-05-26T17:44:56+00:00Added an answer on May 26, 2026 at 5:44 pm

    There are three timeouts:

    1. PHP Level: set_time_limit
    2. Apache Level: Timeout
    3. Mysql Level: Mysql Options

    In your case seems like the Apache reached its timeout. In such situation it is better to use PHP CLI. But if you really need to do this operation in real-time. Then you can make use of Gearman through which you will achieve true parallelism in PHP.

    If you need simple solution that trigger your script from normal HTTP request (Browser->Apache), you can run your back-end script (CLI script) as shell command from PHP but ‘asynchronously’. More info can be found in Asynchronous shell exec in PHP

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a php script that is run once a minute. The script runs
I have a form that needs to run a php script once the submit
I have a PHP script that runs as a CGI program and the HTTP
I have a php script that runs a mysql query, then loops the result,
I have a command-line PHP script that runs a wget request using each member
I have a PHP script that runs a SELECT query then immediately deletes the
I have a PHP script that runs on cron that can take up to
I have a php script that runs some checks, if the checks fail it
i have a php script that runs perfectly but i get 2 errors: Warning:
I have a PHP script that runs database queries. Now, if a query fails,

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.