# PHP-FPM and max_execution_time

- Thread: https://externals.io/message/58735
- Original archive: https://news-web.php.net/php.internals/58735
- Started by Christian Kaps on 2012-03-07T11:47:49+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #58735 — Christian Kaps — 2012-03-07T11:47:49+00:00

URL: https://externals.io/message/58735#58735

Hi,

before I submit a Bug report I wanted to validate if it's a bug or not.

I try to increase the max_execution_time for a test script. What I have 
done is to set php_admin_value[max_execution_time] = 100 in the config 
for my pool. The `phpinfo()` output shows this value for 
max_execution_time. But the scripts displays an Internal Server Error 
after 30 seconds. The Apache has no limit sets.

Here is the simple script:
<?php

sleep(40);

 `phpinfo()`;

The Apache logs prints:
FastCGI: comm with server "/home/christian.kaps/fcgi.sock" aborted: 
idle timeout (30 sec)
FastCGI: incomplete headers (0 bytes) received from server 
"/home/christian.kaps/fcgi.sock"

Some settings:
PHP 5.3.10 on Gentoo Linux
request_terminate_timeout = 0


Are there any gotchas which I haven't observed?

Christian

---

## #58737 — Antony Dovgal — 2012-03-07T12:32:18+00:00

URL: https://externals.io/message/58735#58737 · In reply to: #58735

> The Apache logs prints:
> FastCGI: comm with server "/home/christian.kaps/fcgi.sock" aborted:
> idle timeout (30 sec)
> FastCGI: incomplete headers (0 bytes) received from server
> "/home/christian.kaps/fcgi.sock"

http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidiotimeout ?

The error in the *Apache* logs kinda means the Apache has hit a timeout, not PHP.


<offtopic>Ugh.. nice anchor/directive name, Apache guys.</offtopic>

-- 
Wbr,
Antony Dovgal
---
http://pinba.org - realtime profiling for PHP

---

## #58738 — Christian Kaps — 2012-03-07T12:48:00+00:00

URL: https://externals.io/message/58735#58738 · In reply to: #58737

Hi,

Am 07.03.2012 13:32, schrieb Antony Dovgal:
> 
> > […]
>
> http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidiotimeout ?
>
> The error in the *Apache* logs kinda means the Apache has hit a
> timeout, not PHP.
>
>
> <offtopic>Ugh.. nice anchor/directive name, Apache guys.</offtopic>
>
> --
> Wbr,
> Antony Dovgal
> ---
> http://pinba.org - realtime profiling for PHP

Thanks, this points me in the right direction. The problem was the 
-idle-timeout property for the FastCgiExternalServer directive.

http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html

Christian
