[webui history] Cannot receive data from [object Object]: timeout

414 views
Skip to first unread message

Donald Baud

unread,
Apr 25, 2017, 10:21:42 AM4/25/17
to rspamd
I started getting an error in the webui history tab.
The history doesn't display any additional messages.

I tried resetting with the red reset button.
it wipes the messages but I still get the error without displaying any additional messages.

#redis_cli
127.0.0.1:6379> LLEN "rs_historymyserver.example.com_zst"
(integer) 1261
127.0.0.1:6379> LTRIM "rs_historymyserver.example.com_zst" 100 3000
 OK

Trimming the latest history records usually fixes the problem but it reappears every once in a while.
I'm using rspamd-1.5.4 on FreeBSD

Alexander Moisseev

unread,
Apr 25, 2017, 12:02:09 PM4/25/17
to rsp...@googlegroups.com
On 25.04.2017 17:21, Donald Baud wrote:
> Trimming the latest history records usually fixes the problem but it reappears every once in a while.
> I'm using rspamd-1.5.4 on FreeBSD
>
I guess when the history is getting bigger it has not enough time to load before timeout occurs.
In 1.5.5 the timeout was increased from 2s to 20s and the error message was fixed as well.
Upgrading to 1.5.6 should fix your issues.

Patrick Pichon

unread,
Aug 12, 2017, 7:06:23 AM8/12/17
to rspamd
I'm using rspamd 1.6.2 on Fedora 26 and I'm getting this issue as well "Cannot receive data from rspamd.xxx.xxx: timeout" !

 while all other aspect of WebUI works well !

Patrick Pichon

unread,
Aug 12, 2017, 7:37:55 AM8/12/17
to rspamd
$ redis-cli
127.0.0.1:6379> LLEN "rs_historyxxx.xxxx.xxx_zst"
(integer) 2000
127.0.0.1:6379> LTRIM "rs_historyxxx.xxx.xxx_zst" 100 3000
OK
127.0.0.1:6379> LTRIM "rs_historyxxx.xxx.xx_zst" 100 5000
OK

Patrick Pichon

unread,
Aug 13, 2017, 6:18:42 AM8/13/17
to rspamd
Any ideas ?

Patrick Pichon

unread,
Aug 17, 2017, 3:47:33 AM8/17/17
to rspamd
Did more investigation and found that /var/lib/rspamd.history doesn't exist !

However it is defined in /etc/rspamd/options.inc
history_file = "$DBDIR/rspamd.history";
history_rows = 200;

Patrick Pichon

unread,
Aug 17, 2017, 5:13:31 AM8/17/17
to rspamd
Confirmation that it makes sense not to have the file as history_redis module is activated

From the log :
rspamd[2851]: (main) <eob8rk>; cfg; rspamd_init_lua_filters: init lua module history_redis

cat /etc/rspamd/local.d/history_redis.conf
servers = 127.0.0.1:6379; # Redis server to store history
key_prefix = "rs_history"; # Default key name
nrows = 2000; # Default rows limit
compress = true; # Use zstd compression when storing data in redis


So why WebUI doesn't take any data ?

Patrick Pichon

unread,
Aug 17, 2017, 8:51:41 AM8/17/17
to rspamd
I did continue my investigation and I decided to disabled the history_redis by removing in modules.d and in local.d the history_redis.conf file.

Now I got history back on the WebUi
Aug 17 09:54:20  rspamd[2851]: (main) <eob8rk>; cfg; rspamd_init_lua_filters: init lua module history_redis
Aug 17 14:45:13  rspamd[8279]: (main) <iehnzq>; cfg; rspamd_config_is_module_enabled: lua module history_redis is enabled but has not been configured
Aug 17 14:45:13  rspamd[8279]: (main) <iehnzq>; cfg; rspamd_config_is_module_enabled: history_redis disabling unconfigured lua module
Aug 17 14:45:13  rspamd[8279]: (main) rspamd_roll_history_load: stored history is smaller than the current one: 0 (file) vs 200 (history)

So now I have no clue why when hisorty_redis is enabled , I didn't get the history in WebUi !!!!!!

Vsevolod Stakhov

unread,
Aug 17, 2017, 8:59:06 AM8/17/17
to Patrick Pichon, rspamd
Redis has more data stored than old plain files. Reduce history_rows,
enable compression for history. Rspamd 1.7 also supports HTTP
compression that significantly reduces traffic being sent for history.
You can also increase timeout in WebUI as well (by editing source code,
however).

Patrick Pichon

unread,
Aug 17, 2017, 9:23:08 AM8/17/17
to rspamd
Thanks for your advice

reducing nrows to 125  made de trick

compression was already there see the local.d/history_redis.conf

servers = 127.0.0.1:6379; # Redis server to store history
key_prefix = "rs_history"; # Default key name
nrows = 125; # Default rows limit

compress = true; # Use zstd compression when storing data in redis

:-)
Reply all
Reply to author
Forward
0 new messages