Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Timeout performing SCAN

getting "Timeout performing SCAN, inst: 0, mgr: ExecuteSelect, queue: 1, qu=1, qs=0, qc=0, wr=0/1, in=0/0" while asking for keys on redis

Have no idea why it is happening ?

public void DeleteKeys(string pattern)
{
    try
    {
        EndPoint[] endPoints = m_connectionMultiplexer.GetEndPoints();
        foreach (EndPoint endPoint in endPoints)
        {
            IServer server = m_connectionMultiplexer.GetServer(endPoint);
            RedisValue redisValue = pattern;
            IEnumerable<RedisKey> redisKeys = server.Keys(0, redisValue);
            foreach (RedisKey redisKey in redisKeys)
            {
                m_connectionMultiplexer.GetDatabase().KeyDelete(redisKey);
            }  
        }

    }
    catch (Exception ex)
    {
        m_logger.Exception(ex);
    }
}
like image 493
eugeneK Avatar asked Nov 01 '22 15:11

eugeneK


1 Answers

That particular combination of status flags tells me that one command (specifically: scan) is stuck in the unsent queue, and while it knows a writer is needed, no writer is active. Do you have a full repro? This is probably better raised as a bug.

like image 56
Marc Gravell Avatar answered Nov 25 '22 15:11

Marc Gravell