Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Is there a timeout in Apache 2.2 for long script ?

Posted on 2011-03-01
6
790 Views
Last Modified: 2012-05-11
Hello,
I'm running a very long PHP script  and I have an errors message in Apache log:

[Tue Mar 01 11:45:22 2011] [notice] Child 1344: Waiting 270 more seconds for 1 worker threads to finish.
[Tue Mar 01 11:45:52 2011] [notice] Child 1344: Waiting 240 more seconds for 1 worker threads to finish.
[Tue Mar 01 11:46:22 2011] [notice] Child 1344: Waiting 210 more seconds for 1 worker threads to finish.
[Tue Mar 01 11:46:52 2011] [notice] Child 1344: Waiting 180 more seconds for 1 worker threads to finish.
[Tue Mar 01 11:47:22 2011] [notice] Child 1344: Waiting 150 more seconds for 1 worker threads to finish.
[Tue Mar 01 11:47:53 2011] [notice] Child 1344: Waiting 120 more seconds for 1 worker threads to finish.
[Tue Mar 01 11:48:23 2011] [notice] Child 1344: Waiting 90 more seconds for 1 worker threads to finish.
[Tue Mar 01 11:48:53 2011] [notice] Child 1344: Waiting 60 more seconds for 1 worker threads to finish.
[Tue Mar 01 11:49:23 2011] [notice] Child 1344: Waiting 30 more seconds for 1 worker threads to finish.
[Tue Mar 01 11:49:53 2011] [notice] Child 1344: Waiting 0 more seconds for 1 worker threads to finish.
[Tue Mar 01 11:49:53 2011] [notice] Child 1344: Terminating 1 threads that failed to exit.

in my PHP script I dynamically change the timeout of PHP (ini_set) but for Apache I didn't find any timeout.

Thanks for your help.
0
Comment
Question by:bruno_boccara
  • 3
  • 2
6 Comments
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 35011549
This looks like a "notice" and not an error - I think it is only informational.  What is your script waiting for?
0
 

Author Comment

by:bruno_boccara
ID: 35011615
Hi Ray,
it looks more like a timeout.
my script make a lot of calculation and return an xls file sent by email.
the time to execute can be from 1 sec to 1h (and more....)

on my old system, with apache 2.0 et php4 it works for years.
on the new system I'm implementing, apache 2.2 and php5, I have this "notice".
It is really clear for me that it begins to count from 0 to 270 and if the thread is still running it kills it.

0
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 250 total points
ID: 35011970
Do you have a repeatable set of test data that always runs for a predictable amount of time?  It would be good to have some test data.

I'm not aware of Apache having any need to kill a script.  PHP might, but if you're setting the time limit correctly as the script executes you should be OK.
http://us.php.net/manual/en/function.set-time-limit.php
0
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 
LVL 2

Assisted Solution

by:sapparod
sapparod earned 250 total points
ID: 35067963
How you run php with apache? mod_apache2 or mod_fcgid.
Currently, I think you are running fcgid you can adjust the timeout value

please follow this link.
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
0
 

Author Closing Comment

by:bruno_boccara
ID: 35096388
I only had this error one time and I really don't know what's the problem.
if it's coming back I will reopen a ticket.

thanks for your help anyway.
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 35096694
Glad it's "outta there."  All the best, ~Ray
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question