Changeset 1763
- Timestamp:
- 08/07/08 16:14:18 (4 months ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/cherokee/connection.c (modified) (2 diffs)
- cherokee/trunk/cherokee/server-protected.h (modified) (2 diffs)
- cherokee/trunk/cherokee/thread.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r1760 r1763 1 1 2008-08-07 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * cherokee/connection.c (cherokee_connection_parse_header): Adds a 4 check to ensure that the server will not use keepalive when it is 5 about to reach the overload limit (>95% of the total capacity). 2 6 3 7 * cherokee/server.c (cherokee_server_new): timeout is 5 seconds cherokee/trunk/cherokee/connection.c
r1754 r1763 1715 1715 } 1716 1716 1717 /* Don't use keepalive if the server is about to be overloaded 1718 */ 1719 if ((conn->keepalive) && 1720 (CONN_THREAD(conn)->conns_max > CONN_SRV(conn)->conns_keepalive_max)) 1721 { 1722 conn->keepalive = 0; 1723 } 1724 1717 1725 /* Look for "Range:" 1718 1726 */ … … 1778 1786 * then verify whether the handler supports it. 1779 1787 */ 1780 if ((HANDLER_SUPPORTS (conn->handler, hsupport_length) == 0) && 1781 (HANDLER_SUPPORTS (conn->handler, hsupport_maybe_length) == 0) && 1782 conn->keepalive != 0) { 1788 if ((conn->keepalive != 0) && 1789 (HANDLER_SUPPORTS (conn->handler, hsupport_length) == 0) && 1790 (HANDLER_SUPPORTS (conn->handler, hsupport_maybe_length) == 0)) 1791 { 1783 1792 conn->keepalive = 0; 1784 1793 } cherokee/trunk/cherokee/server-protected.h
r1715 r1763 120 120 cuint_t conns_num_bogo; 121 121 122 cherokee_boolean_t keepalive; 123 cuint_t keepalive_max; 124 122 125 /* Networking config 123 126 */ … … 161 164 cherokee_buffer_t timeout_header; 162 165 163 cherokee_boolean_t keepalive;164 uint32_t keepalive_max;165 166 166 struct { 167 167 off_t min; cherokee/trunk/cherokee/thread.h
r1759 r1763 75 75 cherokee_boolean_t exit; 76 76 77 intconns_num; /* open connections */78 intconns_max; /* max opened conns */77 cuint_t conns_num; /* open connections */ 78 cuint_t conns_max; /* max opened conns */ 79 79 80 80 int active_list_num; /* active connections */