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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:59:53+00:00 2026-05-20T10:59:53+00:00

I am downloading a JSON file from an online source and and when it

  • 0

I am downloading a JSON file from an online source and and when it runs through the loop I am getting this error:

Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\temp\fetch.php on line 24

  • 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-20T10:59:54+00:00Added an answer on May 20, 2026 at 10:59 am

    Optimize your code

    You need to optimize your code and look for errors.

    For example, you could mistakenly create an endless loop. Obviously, in this case increasing the execution time won’t help.

    Or, given you are storing the received data in the database, there are techniques that can greatly improve the performance, such as using transactions or multi-insert queries.

    Profile your code, find performance bottlenecks and optimize them.

    Run as CLI

    In case the code is already optimized but inevitably takes too much time, consider execute it not as a web-page call but as a command line script. When called from a command line, PHP scripts aren’t affected by the time limit.

    For example, you can configure this JSON download as a cron job, or implement some queue, when your web-page only creates a job, that takes a fraction of second, while some background process will take time to download, parse and store your JSON.

    Increase the time limit

    As a last resort you could temporarily extend the time limit, using either

    ini_set('max_execution_time', '300'); //300 seconds = 5 minutes
    

    or

    set_time_limit(300);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am downloading a json file that countain 5000 objects. This is done in
I am downloading some JSON data from a webservice. In this JSON I've got
I am downloading some information from a JSON feed about countries, states and their
This is a gridview that get image from json. and it works fine. I
I'm downloading a file and trying to use JSON.parse, which should return { dateTime:
When downloading a file with HTTPUrlConnection is there a way to check if the
I am downloading files from my server, saving them to device, and displaying them
I'm Downloading stock prices from Yahoo for the S&P500, which has volume too big
I'm using this JSON framework . It's working well but I would like to
I wrote a custom JSON fetcher. From my view controller I call [loader start];

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.