alexl75
Forum Replies Created
-
Forum: Plugins
In reply to: [Redis Object Cache] Group flush not working on AWS Elasticache Serverless@tillkruess I got back on this today. I finally figured out that the cluster mode doesn’t pass through SSL options and this is why I was having issues.
I updated this block to look like this (bolded parts new):
$args = [ 'cluster' => $this->build_cluster_connection_array(), 'timeout' => $parameters['timeout'], 'read_timeout' => $parameters['read_timeout'], 'persistent' => $parameters['persistent'], 'password' => null, 'ssl' => null, ]; if ( isset( $parameters['password'] ) && version_compare( $version, '4.3.0', '>=' ) ) { $args['password'] = $parameters['password']; } if ( defined('WP_REDIS_SSL_CONTEXT')) { $args['ssl'] = WP_REDIS_SSL_CONTEXT; }
I’m now running this config and can run in cluster mode successfully:
define('WP_REDIS_CLIENT', 'phpredis'); define('WP_REDIS_CLUSTER', [ 'tls://' . getenv('WP_REDIS_HOST') . ':6379?alias=node-01', ]); define('WP_REDIS_SSL_CONTEXT', [ 'verify_peer' => false, ]);
However
wp_cache_flush_group('transient')
for instance still returnsfalse
.Forum: Plugins
In reply to: [Redis Object Cache] Group flush not working on AWS Elasticache Serverless@tillkruess got it. Weird that everything still seems to work properly with
WP_REDIS_HOST
. I opened a ticket with AWS to figure out the cluster endpoints to use. I’ll follow up once I have a response.Forum: Plugins
In reply to: [Redis Object Cache] Group flush not working on AWS Elasticache ServerlessI did try the 2 configurations I indicated as their own, separately with no other variables.
With
WP_REDIS_HOST
everything works fine except group flush.With
WP_REDIS_CLUSTER
I get this errorCouldn't map cluster keyspace using any provided seed
on every page load.Forum: Plugins
In reply to: [Redis Object Cache] Group flush not working on AWS Elasticache ServerlessWith this configuration, everything works except group flush:
define('WP_REDIS_CLIENT', 'phpredis'); define('WP_REDIS_SCHEME', 'tls'); define('WP_REDIS_HOST', 'AWS_ENDPOINT_REDACTED'); define('WP_REDIS_PORT', 6379); define('WP_REDIS_DISABLE_BANNERS', true); define('WP_REDIS_IGNORED_GROUPS', ['groups']); // this is the group that we're looking to flush separately
With this configuration, I get the following error on every page load:
Couldn't map cluster keyspace using any provided seed
define('WP_REDIS_CLIENT', 'phpredis'); define('WP_REDIS_CLUSTER', [ 'tls://AWS_ENDPOINT_REDACTED:6379?alias=node-01', ]); define('WP_REDIS_DISABLE_BANNERS', true);
Forum: Plugins
In reply to: [Redis Object Cache] Group flush not working on AWS Elasticache ServerlessI tried the following configs, all preceded with the
phpredis
line, unsuccessfully:define( 'WP_REDIS_CLUSTER', [ 'tcp://FIRST_ENDPOINT:6379?alias=node-01', 'tcp://SECOND_ENDPOINT:6380?alias=node-02', ] ); define( 'WP_REDIS_CLUSTER', [ 'tls://FIRST_ENDPOINT:6379?alias=node-01', 'tls://SECOND_ENDPOINT:6380?alias=node-02', ] ); define( 'WP_REDIS_CLUSTER', [ 'tcp://FIRST_ENDPOINT:6379?alias=node-01', ] ); define( 'WP_REDIS_CLUSTER', [ 'tls://FIRST_ENDPOINT:6379?alias=node-01', ] ); define( 'WP_REDIS_CLUSTER', [ 'tcp://SECOND_ENDPOINT:6380?alias=node-01', ] ); define( 'WP_REDIS_CLUSTER', [ 'tls://SECOND_ENDPOINT:6380?alias=node-01', ] );
I’ll note that we’ve been running the non-cluster config (I added it a couple comments above) with no issues apart from the group flush specifically.
- This reply was modified 10 months, 3 weeks ago by alexl75.
Forum: Plugins
In reply to: [Redis Object Cache] Group flush not working on AWS Elasticache ServerlessHi @julieadrienne,
I did give that a try but I’m getting this error:
Couldn't map cluster keyspace using any provided seed
CLUSTER SHARDS
returns the following:1) 1) slots 2) 1) (integer) 0 2) (integer) 16383 3) nodes 4) 1) 1) id 2) 391fe7f8456c55dd9da927432439baa600000000 3) ip 4) 127.0.0.1 5) endpoint 6) REDACTED 7) hostname 8) REDACTED 9) role 10) master 11) replication-offset 12) 0 13) health 14) online 15) tls-port 16) 6379 2) 1) id 2) a3745ba00b485da78396197c0cf99a5400000000 3) ip 4) 127.0.0.1 5) endpoint 6) REDACTED 7) hostname 8) REDACTED 9) role 10) replica 11) replication-offset 12) 0 13) health 14) online 15) tls-port 16) 6380
I tried both endpoints in both TLS and TCP mode and get the same error every time.
Appreciate your help!
Forum: Plugins
In reply to: [Redis Object Cache] Group flush not working on AWS Elasticache ServerlessHere you go, with a couple extra commands. Let me know if you need anything else.
INFO
:# Server redis_version:7.1 redis_mode:cluster arch_bits:64 run_id:0 # Replication role:master connected_slaves:1 slave0:ip=REDACTED,port=6380,state=online,offset=0,lag=0 # Cluster cluster_enabled:1
INFO CLUSTER
:# Cluster cluster_enabled:1
CLUSTER INFO
:cluster_state:ok cluster_slots_assigned:16384 cluster_slots_ok:16384 cluster_slots_pfail:0 cluster_slots_fail:0 cluster_known_nodes:2 cluster_size:1 cluster_current_epoch:0 cluster_my_epoch:0 cluster_stats_messages_sent:0 cluster_stats_messages_received:0 total_cluster_links_buffer_limit_exceeded:0
Forum: Plugins
In reply to: [Redis Object Cache] Group flush not working on AWS Elasticache ServerlessThat’s all the constants we’re setting, everything else is as is.
Elasticache Serverless is cluster mode enabled by default I believe. There is no option in the admin panel. From the announcement the client has to support cluster mode but they don’t provide a configuration endpoint.
Forum: Plugins
In reply to: [Redis Object Cache] Group flush not working on AWS Elasticache Serverless@julieadrienne it just returns
false
. Here are our cache settings in wp-config.php:define('WP_REDIS_SCHEME', 'tls'); define('WP_REDIS_HOST', 'AWS_ENDPOINT_REDACTED'); define('WP_REDIS_PORT', 6379); define('WP_REDIS_DISABLE_BANNERS', true); define('WP_REDIS_IGNORED_GROUPS', ['groups']); // this is the group that we're looking to flush separately
Let me know if I need to enable any debugging option to get more verbose output.
Forum: Plugins
In reply to: [Groups] Stale cache on wp_count_postsHey?@gtsiokos,
What I’m suspecting is that the Groups cache entry for the
wp_count_posts
override is never cleared/invalidated at all.Unless the expiry is expressly scheduled by passing a TTL with
wp_cache_set
(4th argument, which doesn’t seem to be used in theGroups_Cache
implementation at all) or callingwp_cache_delete
on the entry, which the core implementation does, it won’t ever be cleared or updated.The default
WP_Object_Cache
implementation doesn’t persist across pageloads so that’s fine. However Redis and Memcached are both persistent so with the way theGroups_Cache
class is implemented currently, any value will persist across pageloads forever until it is expressly modified/deleted.Hope this helps,
AlexForum: Plugins
In reply to: [Groups] Stale cache on wp_count_postsHey @gtsiokos,
We’re using this plugin: https://github.com/rhubarbgroup/redis-cache/ with AWS Elasticache (Redis 7.1) with no special options. Should be a fairly standard WP + Redis setup given the popularity of that plugin.
If you have any pointers as to how Groups clears/updates the counts I’m all ears, I can try and troubleshoot directly.
Thanks!
AlexForum: Plugins
In reply to: [ActiveCampaign for WooCommerce] Bug in version 2.5.2For the ActiveCampaign team, your developers need to use the
prefix
option in the Tailwind CSS configuration to avoid conflicting with other CSS files: https://tailwindcss.com/docs/configuration#prefixAlso, please configure the
content
option so that the ActiveCampaign CSS file is pruned properly, a 1.9MB CSS file is excessive for an admin plugin… Docs here: https://tailwindcss.com/docs/content-configuration- This reply was modified 11 months, 4 weeks ago by alexl75.
Très bien, c’est fait. Bonne fin de journée!
Bonjour @alexwcmultishipping,
Après de nouveaux tests, c’est OK pour les produits de type “virtuel”, mais nous avons également des types de produit ajoutés par des plugins qui ne requièrent pas la livraison, par exemple, des billets de spectacle envoyés par mail et des rendez-vous, et ceux-ci bloquent toujours au moment du checkout.
Tout cela est bien pris en compte automatiquement en vérifiant
WC()->cart->needs_shipping()
mais pas en vérifiant spécifiquement la présence de produits virtuels comme fait aux lignes 232-237 depuis la version 2.1.3.Je remarque également qu’il n’y a pas eu de changement dans la fonction
prevent_checkout_process
dans la version 2.1.3, il faudrait peut-être vérifier si il faut y ajouter une validation au niveau de la nécessité du shipping aussi (je n’ai pas réussi à faire échouer le checkout après quelques tests alors peut-être que la session WC est mise à jour rendu là)Voici les docs de la méthode
needs_shipping
: https://woocommerce.github.io/code-reference/classes/WC-Cart.html#method_needs_shippingVoilà, en espérant que le tout soit utile!
Cordialement
Rebonjour,
Il est à noter que nous étions sur la version 2.1.1 lorsque j’ai ouvert le ticket. Nous avons mis à jour à 2.1.3 qui semble avoir quelques bugs réglés au niveau des produits virtuels, mais ce bug semble toujours présent.
Cordialement