Solved

Is there a timeout in Apache 2.2 for long script ?

Posted on 2011-03-01
6
802 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
[X]
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
  • 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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

687 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