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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:46:43+00:00 2026-06-17T05:46:43+00:00

I am using PHP with heroku. I keep on getting a request timeout error

  • 0

I am using PHP with heroku. I keep on getting a request timeout error due to some database insertions and queries.

I added this line to all my php files in order to avoid this error:

set_time_limit(0);

However, I am still getting this error. Does heroku ignore this command?

I did a simple check to see if the time limit is being changed:

echo 'TIME : '.ini_get('max_execution_time');
set_time_limit(0);
echo 'TIME : '.ini_get('max_execution_time');

It is being changed from 30 (default value) to 0. Despite the change, I am still getting the error.

Also, I would like to add that the php file is being called by ajax.

Furthermore, as far as I know, php is not set to safe mode, so there is no reason why the command should be ignored.

Heroku suggests to use a background job, and as far as I can tell, it forces you if the task takes more than 30 seconds. Has anybody managed without using a background job?

Update: Tried using:

ini_set('max_execution_time', 0);

Still does not want to work

  • 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-17T05:46:45+00:00Added an answer on June 17, 2026 at 5:46 am

    If you have to go over the 30s request timeout on Heroku, you’ll need to use a background job – there is no way around that (Heroku will just kill the request if it takes longer than 30 seconds). Heroku has some documentation on this.

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

Sidebar

Related Questions

I am getting this error when I am trying to push to the Heroku
I am using Heroku PHP, and has added the MongoHQ addon. But it gives
Using PHP I echo out table rows in a loop like this: <?php /*
Using php I am trying to get some data from a .csv file which
I am using Heroku to make a php application on Facebook. I want to
Using PHP, If I have a model (a class) where I various queries, whatever
I started a new PHP app on Facebook using Heroku. They start you out
In PHP, I am using this code to define where to log errors: ini_set('error_log',
Using php's DOMDocument->LoadHTMLFile('test.html'); keeps on returning an error to me, reporting for an error
Using PHP to try and tackle this problem, but open to other solutions (Python,

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.