# Socket Timeout Documentation

- Thread: https://externals.io/message/44618
- Original archive: https://news-web.php.net/php.internals/44618
- Started by Brian A. Seklecki on 2009-07-01T23:01:55+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

---

## #44618 — Brian A. Seklecki — 2009-07-01T23:01:55+00:00

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

All:

Perhaps we should clarify the socket tuneables such as:

  ; Default timeout for socket based streams (seconds)
  default_socket_timeout = 60

These are slightly ambiguous.  e.g., we should clarify connect()
timeouts v.s. "idle" timeouts.  

There are at least a dozen tickets open related to timeout behavior and
a lot of the confusion results of ambiguity in the variable naming
convention and documentation.

 ~BAS

---

## #44744 — Hannes Magnusson — 2009-07-07T09:48:34+00:00

URL: https://externals.io/message/44618#44744 · In reply to: #44618

On Thu, Jul 2, 2009 at 01:01, Brian A.
Seklecki<seklecki@noc.cfi.pgh.pa.us> wrote:
> All:
>
> Perhaps we should clarify the socket tuneables such as:
>
>  ; Default timeout for socket based streams (seconds)
>  default_socket_timeout = 60
>
> These are slightly ambiguous.  e.g., we should clarify connect()
> timeouts v.s. "idle" timeouts.

Anyone that knows the answer to this?


> There are at least a dozen tickets open related to timeout behavior and
> a lot of the confusion results of ambiguity in the variable naming
> convention and documentation.

Could you post the ones you know of here please?

-Hannes

---

## #44811 — Wez Furlong — 2009-07-08T01:26:23+00:00

URL: https://externals.io/message/44618#44811 · In reply to: #44744

This option sets the default value for the timeout, as though you
manually called stream_set_timeout on the stream.

The behavior is equivalent to using select() to wait for up to the
timeout duration prior to a read or write operation.

PHP does not implement "idle" timeouts; that's an application level behavior.

It should be noted that a timeout in this sense can be a transient
condition in the case of a read operation, it does not necessarily
indicate that the connection is bad, just that no new data is
available within the time allotted.

More general streams bits here that may or may not be apparent from the docs:
http://www.slideshare.net/wezfurlong/php-streams-lucky-dip

--Wez.


On Tue, Jul 7, 2009 at 5:48 AM, Hannes
Magnusson<hannes.magnusson@gmail.com> wrote:
> On Thu, Jul 2, 2009 at 01:01, Brian A.
> Seklecki<seklecki@noc.cfi.pgh.pa.us> wrote:
> > […]
>
> Anyone that knows the answer to this?
>
>
> > […]
>
> Could you post the ones you know of here please?
>
> -Hannes
