From d02a917f3898bc3feee0617612d1ffce08188d56 Mon Sep 17 00:00:00 2001 From: Nick Ballenger Date: Thu, 18 Jul 2019 16:17:28 -0700 Subject: [PATCH] Commented out 'invalidation_service' section I commented out the entire 'invalidation_service' section from app_config.yml. It _should_ be sufficient to set 'enabled' to false in that block, in order to prevent the Redis/Resque based invalidation service from being used inside the postgres trigger for invalidating cache items, but it's actually easier to just comment out the whole block. See this portion of the Carto code for reference: https://github.com/CartoDB/cartodb/blob/05a05fd6959bf4cc42480daec08d28449532cd8e/app/models/user/db_service.rb#L1062-L1070 The branch we want to go down in that code is the middle one--we want to end up with `create_function_invalidate_varnish_http` running. That will create a postgres trigger based on hitting the Varnish server's HTTP listener, which is running on 6081. (You could have it hit the telnet port by taking the third branch of that code, but given that telnet isn't included in later Varnish versions, best not to.) You want to avoid the first branch of that code, `create_function_invalidate_varnish_invalidation_service`, because it includes this line: https://github.com/CartoDB/cartodb/blob/05a05fd6959bf4cc42480daec08d28449532cd8e/app/models/user/db_service.rb#L1601 That's calling a custom Redis command, `TCH`, which is defined in a repo that Carto has not open sourced--meaning the 'invalidation service' (as a Redis job queue for the Resque job runner) can't be used in open source Carto (unless you reverse engineer the Redis commands it uses.) --- config/app_config.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config/app_config.yml b/config/app_config.yml index 42460a5..025116e 100644 --- a/config/app_config.yml +++ b/config/app_config.yml @@ -163,14 +163,14 @@ defaults: &defaults timeout: 5 # 'warning' or 'error' trigger_verbose: true - invalidation_service: - enabled: false - host: '127.0.0.1' - port: 3142 - retries: 5 # number of retries before considering failure - critical: false # either the failure is considered an error or a warning - timeout: 5 # socket timeout - trigger_verbose: true +# invalidation_service: +# enabled: false +# host: '127.0.0.1' +# port: 3142 +# retries: 5 # number of retries before considering failure +# critical: false # either the failure is considered an error or a warning +# timeout: 5 # socket timeout +# trigger_verbose: true redis: host: '127.0.0.1' port: 6379