Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dcache-xroot: interrupt doOnOpen thread in the event of channel inactive
Motivation: Since June at FNAL we have encountered a situation where after the xroot door has been running for a while, clients begin to be refused connections. We have also noticed during this period that some requests are hanging on open, and that the client quits (the channel goes inactive), but the thread processing the Pool Manager selection waits for a hour before timing out. Our conjecture is that the latter situation is contributing to the rejection of other client connections because if the client that initiated the transfer keeps timing out and retrying, it will use up all the threads available to service open requests (alternately, several clients could be engaged in something similar). For whatever reason ... whether the client is requesting a file which has not been prestaged, or for slowness on the part of the Pool Manager ... the transfer request should not be allowed to continue once the channel goes inactive. Modification: In the request handler, record the thread that is servicing the open request and then null it out when the request returns. Should the channel go inactive and find the thread not null, it will interrupt it. This will break any synchronous 'get' on the futures from pool selection and mover start. Result: The client may retry, but the previous thread should be released and made available again, preventing thread starvation and inability to allow more clients to connect. Target: master Patch: https://rb.dcache.org/r/13638/ Request: 8.1 Request: 8.0 Request: 7.2 Requires-book: no Acked-by: Dmitry
- Loading branch information