1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-28 11:57:22 +03:00
Commit Graph

12 Commits

Author SHA1 Message Date
Stefan Fritsch
d9781f1734 Exit threads early during shutdown, part 2
Follow up to r1738466: During graceful shutdown, when the listener thread is
closing a connection, it needs to wake up a worker thread so that it may
terminate.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1738486 13f79535-47bb-0310-9956-ffa450edef68
2016-04-10 22:53:42 +00:00
Stefan Eissing
7c6d768d77 reverting the reverting of r1735174, r1735176 was the culprit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1735227 13f79535-47bb-0310-9956-ffa450edef68
2016-03-16 13:09:47 +00:00
Stefan Eissing
9a54010ad2 reverting r1735174 as http/1.1 just terminated before response
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1735216 13f79535-47bb-0310-9956-ffa450edef68
2016-03-16 11:06:28 +00:00
Graham Leggett
008d76cc3f mpm: Generalise the ap_mpm_register_socket functions to accept pipes or sockets.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1735174 13f79535-47bb-0310-9956-ffa450edef68
2016-03-15 22:52:51 +00:00
Stefan Fritsch
b1cd56c513 When shutting down a process, free resources early
Due to lingering connections, shutting down a process may take a very
long time. Free all recycled pools early in the hope that we can already
give some memory back to the OS.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705922 13f79535-47bb-0310-9956-ffa450edef68
2015-09-29 20:16:47 +00:00
Eric Covener
d758951456 Extend the socket callbacks in event to allow a timeout on the I/O callback.
When a socket callback has a timeout, an associated timer event is used to 
remove the sockets from the pollset and call a timeout function.

* This includes a noteworthy change to the main event loop. Previously,
we would call epoll, then process the timer events, then iterate through the
poll results. After this patch, the timer events are processed before the poll()
a _non-queued_ action can change the pollset conents (a users timed callback
function conversely could easily sit in a queue while the main thread continues
down into epoll)

* timer events can now have sockets associated with them, those sockets are 
removed from the pollset when the timer event fires w/o a queue to the worker.

* timer events now have a canceled flag that can be toggled without locking
the timer list. 

* Drop the severity of some wstunnel messages from DEBUG to TRACE1

* Lift the restriction on using asynchronous websockets connections but having
an idle timeout



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1593857 13f79535-47bb-0310-9956-ffa450edef68
2014-05-11 20:41:45 +00:00
Stefan Fritsch
40ac38ff05 Remove MPM-private stuff from conn_state_t
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204104 13f79535-47bb-0310-9956-ffa450edef68
2011-11-19 23:35:46 +00:00
Jim Jagielski
103f776c25 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174748 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:38:09 +00:00
Stefan Fritsch
18fdb9d711 Some improvements for handling of many connections for MPM event:
- Process lingering close asynchronously instead of tying up worker threads
  (based on patch by Jeff Trawick).

- If the number of connections of a process is above

     threads_per_child  +  WORKER_OVERCOMMIT * (idle_workers - 1)

  (WORKER_OVERCOMMIT is fixed at 2, at the moment), or if all workers are busy,
  don't accept new connections in that process. Such a dynamic connection limit
  is necessary because we may have both async and non-async (ssl) connections.
  WORKER_OVERCOMMIT should be a config option.

- Don't count idle workers of not-accepting processes against MinSpareThreads,
  so that the parent will spawn new processes when necessary.

- If we receive a keep-alive request while all workers are busy, don't block
  but close the connection immediately so that the client will re-connect to a
  different process.

Related changes:

- Log what is going on at trace loglevels.
- Remove the bypass_push poll type flag, this code cannot be hit anymore
  (if it ever could?).
- Add some macro helpers for dealing with timeout queues.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137358 13f79535-47bb-0310-9956-ffa450edef68
2011-06-19 12:23:42 +00:00
Stefan Fritsch
6fb57c93e6 If MaxMemFree is set, limit the number of recycled pools that is kept
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137262 13f79535-47bb-0310-9956-ffa450edef68
2011-06-18 22:29:49 +00:00
Jim Jagielski
5790ed1c71 Revert an old (~10yr) change to the fd Q; move back to
FIFO rather than LIFO, for more consistent performance
so that older requests don't suffer

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1064269 13f79535-47bb-0310-9956-ffa450edef68
2011-01-27 19:34:38 +00:00
Jeff Trawick
0221146859 The Event MPM is no longer experimental; move it out of that ghetto.
Yank the few bits that implement the concept of an experimental MPM.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759115 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 12:35:33 +00:00