On 12/02/2021 17:34, Ruediger Pluem wrote:


On 2/12/21 5:17 PM, jean-frederic clere wrote:
Hi,

I have the warnings in error_log when a web socket is opened at the shutdown 
time:

+++
[Fri Feb 12 16:10:39.243444 2021] [core:warn] [pid 2879580:tid 140162655000576] 
AH00045: child process 2879590 still did not exit,
sending a SIGTERM
[Fri Feb 12 16:10:41.245444 2021] [core:warn] [pid 2879580:tid 140162655000576] 
AH00045: child process 2879590 still did not exit,
sending a SIGTERM
+++

ap_proxy_tunnel_run()

there is:
+++
     do {
         const apr_pollfd_t *results;
         apr_int32_t nresults, i;

         ap_log_rerror(APLOG_MARK, APLOG_TRACE8, 0, r,
                       "proxy: %s: polling (client=%hx, origin=%hx)",
                       scheme, client->pfd->reqevents, origin->pfd->reqevents);
         do {
             rv = apr_pollset_poll(pollset, timeout, &nresults, &results);
         } while (APR_STATUS_IS_EINTR(rv));
+++

I don't remember why we have the while here...
Is there a way to test why the get the signal in ap_proxy_tunnel_run() and 
react on shutdown command to prevent the warning message?

Maybe we could run ap_mpm_query(AP_MPMQ_MPM_STATE, &result)
and drop out if result == AP_MPMQ_STOPPING

Yes that works ;-)

But typically the shutdown is graceful in the sense that the request should be 
finished. Maybe a bad idea with long lasting tunnels.

Correct...


Regards

Rüdiger



--
Cheers

Jean-Frederic

Reply via email to