osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug 61979] some listener thread failures do no wake workers


https://bz.apache.org/bugzilla/show_bug.cgi?id=61979

--- Comment #3 from Yann Ylavic <ylavic.dev@xxxxxxxxx> ---
Created attachment 35665
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35665&action=edit
Listener resource shortage

Maybe something like this could work.

The patch moves the disabling (poll) of the listen sockets from close_listeners
to wakeup_listener, where listener_may_exit is set already along with anything
to start the listener graceful stop, but mainly a callee of signal_threads.
Thus after signal_threads is called, the listener can continue its loop(s)
without creating new connections or pools (i.e. maintenance job only, though
the workers may still encounter OOM...).

In case of allocation failure, the resource_shortage flag is also set to avoid
creating a new child too quickly, that'll possibly help recovery.

Finally the patch also changes the init_pollset failure to be ungraceful, there
is nothing to wait for at this point IMO, with resource_shortage=1 still.

Note: I had to make ap_child_slot global to avoid forwarding the local
process_slot var/arg too much...

Wouldn't this "work"?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: bugs-help@xxxxxxxxxxxxxxxx