Solved

Is there a timeout in Apache 2.2 for long script ?

Posted on 2011-03-01
6
794 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 110

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 110

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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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 110

Expert Comment

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

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

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 …
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

696 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