Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing gives processing timeout exception #95

Open
SuheylZ opened this issue Aug 30, 2024 · 1 comment
Open

Publishing gives processing timeout exception #95

SuheylZ opened this issue Aug 30, 2024 · 1 comment

Comments

@SuheylZ
Copy link

SuheylZ commented Aug 30, 2024

Whenever I try to publish the message, i get processing timeout at the following line

public function dispatch(string $name, mixed $payload, ?float $timeout = null)
    {
        if ($timeout === null) {
            $timeout = $this->configuration->timeout;
        }

        $context = (object) [
            'processed' => false,
            'result' => null,
            'threshold' => microtime(true) + $timeout,
        ];

        $this->request($name, $payload, function ($result) use ($context) {
            $context->processed = true;
            $context->result = $result;
        });

        while (!$context->processed && microtime(true) < $context->threshold) {
            $this->process();
        }

        if (!$context->processed) {
            throw new LogicException("Processing timeout");     // this causes exception
        }

        return $context->result;
    }

What should I do in this case?
I'm running nats in docker and nats-box is not only able to onnect but also an publish mesages on that stream

@ro0NL
Copy link
Contributor

ro0NL commented Oct 22, 2024

it's probably more a server issue, than a client one. but im not 100% sure

we still see stream issue now&then

context_exception_file: vendor/basis-company/nats/src/Connection.php:138
context_exception_message: Error sending data

but we have a fallback MySQL connection, so OK

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

No branches or pull requests

2 participants