[Rspamd-Users] Fuzzy local

Florian Piekert floppy at floppy.org
Fri Jul 11 06:20:23 UTC 2025


Hello,

what is the limit.conf that systemd found for redis? Do you have such a file in /etc/redis/ ? Is that the reason for the "script" that is "running"?

I only have the plain redis.conf there, the defaults work fine (OK, I modified some aspects like bind-source-addr or memory).

Then in (applies for all 3 files) /etc/rspamd/local.d/ I have
redis.conf
-8<-
write_servers = "localhost";
read_servers = "localhost";
-8<-

fuzzy_check.conf
-8<-
# local.d/fuzzy_check.conf
timeout = 4s;
retransmits = 3;

rule "local" {
    # Fuzzy storage server list
    servers = "localhost:11335";

    # Default symbol for unknown flags
    symbol = "LOCAL_FUZZY_UNKNOWN";

    # Additional mime types to store/check
    mime_types = ["application/*"];

    # Hash weight threshold for all maps
    max_score = 20.0;

    # Whether we can learn this storage
    read_only = no;

    # Ignore unknown flags
    skip_unknown = yes;

    # Hash generation algorithm
    algorithm = "mumhash";

    # Map flags to symbols
    fuzzy_map = {

       LOCAL_FUZZY_DENIED {
          # Local threshold
          max_score = 20.0;
          # Flag to match
          flag = 11;
       }

       LOCAL_FUZZY_PROB {
          max_score = 10.0;
          flag = 12;
       }

       LOCAL_FUZZY_WHITE {
          max_score = 2.0;
          flag = 13;
       }
   }
}
-8<-
and in

worker-fuzzy.inc
-8<-
bind_socket = "localhost:11335";
# Number of processes to serve this storage (useful for read scaling)
count = 16;
# Backend ("sqlite" or "redis" - default "sqlite")
backend = "redis";
# Hashes storage time (3 months)
expire = 90d;
# Synchronize updates to the storage each minute
sync = 1min;
allow_update = [ "127.0.0.1", "::1" ];
-8<-

Florian

>> It might help to check the Rspamd logs.
>>
> 
> yes ,  This shows me the log:
> 
> fuzzy backend redis error: "BUSY Redis is busy running a script. You can
> only call SCRIPT KILL or SHUTDOWN NOSAVE."
> 
> fuzzy_redis; rspamd_fuzzy_redis_count_callback: error getting count on
> 127.0.0.1:6379: Connection timed out
> 
> 9.28378 (1 beats lost previously)
> 2025-07-10 21:58:19 #33389(main) <f48ac6>; main; rspamd_main_heartbeat_cb:
> received heartbeat from worker type fuzzy with pid 33390, last beat on:
> 2025-07-10 21:58:19.28376 (2 beats lost previously)
> 2025-07-10 21:58:19 #33392(fuzzy) <u33g77>; fuzzy_redis;
> rspamd_fuzzy_redis_count_callback: fuzzy backend redis error: "BUSY Redis
> is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE."
> 
> my redis setting on rspamd is :
> 
> servers = "127.0.0.1";
> 
> redis server is working
> 
> systemctl status redis
> ● redis.service - Redis persistent key-value database
>       Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled;
> preset: disabled)
>      Drop-In: /etc/systemd/system/redis.service.d
>               └─limit.conf
>       Active: active (running) since Thu 2025-07-03 14:06:11 CST; 1 week 0
> days ago
>     Main PID: 12956 (redis-server)
>       Status: "Ready to accept connections"
>        Tasks: 5 (limit: 48908)
>       Memory: 155.4M
>          CPU: 2h 32min 9.143s
>       CGroup: /system.slice/redis.service
>               └─12956 "/usr/bin/redis-server 127.0.0.1:6379"
> 
>   any idea my friends!
> 
> 



More information about the Users mailing list