Search is uninterruptable

Aki Tuomi aki.tuomi at dovecot.fi
Mon Mar 1 19:57:47 EET 2021


> On 01/03/2021 15:30 van der Kamp, John <jkamp at amazon.nl> wrote:
> 
>  
> Hi,
> 
> When a user is doing a search, and the data is not indexed, then a search can take a very long time. It seems that search process is uninterruptable. The IMAP connection gets a status message with an ETA every so often, but an administrator on the server cannot stop it. Any SIGTERM or doveadm kick is ignored. Also, when the client times out (it seems clients are not seeing the ETA as a reason to keep the connection open) and the client disconnects is this search process continuing, even though any write to the socket would return an error.
> 
> I believe the server is stuck in this loop: https://github.com/dovecot/core/blob/master/src/lib-storage/index/index-search.c#L1788
> 
> Somehow the server needs to check for disconnected clients and let the session be kicked from the server too. You probably know better what to do about this then me.
> 
> John
> 
> 
> 
> Amazon Development Center (Netherlands) B.V., Johanna Westerdijkplein 1, 2521 EN The Hague, Registration No. Chamber of Commerce 56869649, VAT: NL 852339859B01

Hi!

One solution would be to use FTS. While it does not make search any more terminatable, it would increase the likelihood of search returning in few seconds.

Aki


More information about the dovecot mailing list