Solved

Is there a timeout in Apache 2.2 for long script ?

Posted on 2011-03-01
6
776 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 108

Expert Comment

by:Ray Paseur
Comment Utility
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
Comment Utility
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 108

Accepted Solution

by:
Ray Paseur earned 250 total points
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 2

Assisted Solution

by:sapparod
sapparod earned 250 total points
Comment Utility
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
Comment Utility
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 108

Expert Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now