Skip to content

Relay\Cluster subscribe method throwing Relay\Exception: Resource temporarily unavailable #163

Discussion options

You must be logged in to vote

Hi 👋,

This is just a read timeout. You can fix the specific use case by doing something like this:

<?php

use Relay\Cluster;
use Relay\Relay;

$cluster = $argc > 1 ? $argv[1] : "tcp://valkey-cluster-untracked:6372";


$relayCluster = new Cluster(
    "unprefixed-untracked",
    [$cluster],
    5,
    5,
    false,
    null,
    [],
);

// No timeout
$relayCluster->setOption(Relay::OPT_READ_TIMEOUT, 0);

$relayCluster->subscribe(['abc'], function (): void {
    echo 'subscribed';
});

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tillkruss
Comment options

You must be logged in to vote
1 reply
@michael-grunder
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants