diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2017-11-15 14:09:55 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-11-15 14:12:24 -0500 |
| commit | de0d1ea44744b37750915b9ba80d5b3d90de9f5e (patch) | |
| tree | eac68f7aa23bb1bce69bd46ae4051cad62aebf97 /docs | |
| parent | 1ef9283d7f9c616ff145317e264cc11e3f6b781e (diff) | |
| download | cherrypy-git-de0d1ea44744b37750915b9ba80d5b3d90de9f5e.tar.gz | |
Update documentation reflecting new conditions
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/advanced.rst | 49 | ||||
| -rw-r--r-- | docs/extend.rst | 2 | ||||
| -rw-r--r-- | docs/install.rst | 1 | ||||
| -rw-r--r-- | docs/tutorials.rst | 1 |
4 files changed, 3 insertions, 50 deletions
diff --git a/docs/advanced.rst b/docs/advanced.rst index 16ac25cd..3def3437 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -325,55 +325,12 @@ the client. Because of the issues outlined above, **it is usually better to flatten (buffer) content rather than stream content**. Do otherwise only when the benefits of streaming outweigh the risks. -Response timeouts -################# +Response timing +############### -CherryPy responses include 3 attributes related to time: +CherryPy responses include an attribute: * ``response.time``: the :func:`time.time` at which the response began - * ``response.timeout``: the number of seconds to allow responses to run - * ``response.timed_out``: a boolean indicating whether the response has - timed out (default False). - -The request processing logic inspects the value of ``response.timed_out`` at -various stages; if it is ever True, then :class:`TimeoutError` is raised. -You are free to do the same within your own code. - -Rather than calculate the difference by hand, you can call -``response.check_timeout`` to set ``timed_out`` for you. - -.. note:: - - The default response timeout is 300 seconds. - -.. _timeoutmonitor: - -Timeout Monitor -^^^^^^^^^^^^^^^ - -In addition, CherryPy includes a ``cherrypy.engine.timeout_monitor`` which -monitors all active requests in a separate thread; periodically, it calls -``check_timeout`` on them all. It is subscribed by default. To turn it off: - -.. code-block:: ini - - [global] - engine.timeout_monitor.on: False - -or: - -.. code-block:: python - - cherrypy.engine.timeout_monitor.unsubscribe() - -You can also change the interval (in seconds) at which the timeout monitor runs: - -.. code-block:: ini - - [global] - engine.timeout_monitor.frequency: 60 * 60 - -The default is once per minute. The above example changes that to once per hour. Deal with signals ################# diff --git a/docs/extend.rst b/docs/extend.rst index 5b4dd80c..56eb9859 100644 --- a/docs/extend.rst +++ b/docs/extend.rst @@ -318,7 +318,6 @@ this application: [27/Apr/2014:13:04:07] ENGINE Listening for SIGUSR1. [27/Apr/2014:13:04:07] ENGINE Bus STARTING [27/Apr/2014:13:04:07] ENGINE Started monitor thread 'Autoreloader'. - [27/Apr/2014:13:04:07] ENGINE Started monitor thread '_TimeoutMonitor'. [27/Apr/2014:13:04:08] ENGINE Serving on http://127.0.0.1:8080 [27/Apr/2014:13:04:08] ENGINE Bus STARTED @@ -346,7 +345,6 @@ This is what we get: [27/Apr/2014:13:08:06] ENGINE Listening for SIGUSR1. [27/Apr/2014:13:08:06] ENGINE Bus STARTING [27/Apr/2014:13:08:06] ENGINE Started monitor thread 'Autoreloader'. - [27/Apr/2014:13:08:06] ENGINE Started monitor thread '_TimeoutMonitor'. [27/Apr/2014:13:08:06] ENGINE Bus STARTED As you can see, the server is not started. The missing: diff --git a/docs/install.rst b/docs/install.rst index 9fa0d20b..c558ac0f 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -78,7 +78,6 @@ Once started the above command shows the following logs: [15/Feb/2014:21:51:22] ENGINE Listening for SIGUSR1. [15/Feb/2014:21:51:22] ENGINE Bus STARTING [15/Feb/2014:21:51:22] ENGINE Started monitor thread 'Autoreloader'. - [15/Feb/2014:21:51:22] ENGINE Started monitor thread '_TimeoutMonitor'. [15/Feb/2014:21:51:22] ENGINE Serving on http://127.0.0.1:8080 [15/Feb/2014:21:51:23] ENGINE Bus STARTED diff --git a/docs/tutorials.rst b/docs/tutorials.rst index 92490d50..c25cf747 100644 --- a/docs/tutorials.rst +++ b/docs/tutorials.rst @@ -53,7 +53,6 @@ This will display something along the following: The Application mounted at '' has an empty config. [24/Feb/2014:21:01:46] ENGINE Started monitor thread 'Autoreloader'. - [24/Feb/2014:21:01:46] ENGINE Started monitor thread '_TimeoutMonitor'. [24/Feb/2014:21:01:46] ENGINE Serving on http://127.0.0.1:8080 [24/Feb/2014:21:01:46] ENGINE Bus STARTED |
