EventStore.JVM icon indicating copy to clipboard operation
EventStore.JVM copied to clipboard

Operation hasn't got response from server for PackOut

Open fafzal opened this issue 10 years ago • 11 comments

Getting a below exception when client application trying to read events from EventStore. The exception not always occur. I am running an application inside a docker container, I use a EventStore client ver 2.0.3. I already try setting a operation timeout property to 1m but its doesn't solve a problem.

Operation hasn't got response from server for PackOut(ReadStreamEvents(Stream(auction),EventNumber(0),500,Forward,false,true),9a1c4692-6a1a-4021-bb41-b3c80ed9e748,Some(UserCredentials(admin,***)))

fafzal avatar Sep 16 '15 11:09 fafzal

strange... @fafzal could you please try to experiment with maxCount, it is 500 according to your log

t3hnar avatar Sep 16 '15 11:09 t3hnar

What if anything is in your eventstore logs when this happens?

On Wed, Sep 16, 2015 at 2:34 PM, Yaroslav Klymko [email protected] wrote:

strange... @fafzal https://github.com/fafzal could you please try to experiment with maxCount, it is 500

— Reply to this email directly or view it on GitHub https://github.com/EventStore/EventStore.JVM/issues/42#issuecomment-140714016 .

Studying for the Turing test

gregoryyoung avatar Sep 16 '15 11:09 gregoryyoung

@gregoryyoung nothing strange i can see in EventStore logs.

fafzal avatar Sep 16 '15 12:09 fafzal

ok I would suggest trying with smaller than 500 if there are some very big events this could cause quite an issue .... Do you get the same behaviour with 50?

On Wed, Sep 16, 2015 at 3:05 PM, fafzal [email protected] wrote:

@gregoryyoung https://github.com/gregoryyoung nothing strange i can see in EventStore logs.

— Reply to this email directly or view it on GitHub https://github.com/EventStore/EventStore.JVM/issues/42#issuecomment-140721203 .

Studying for the Turing test

gregoryyoung avatar Sep 16 '15 12:09 gregoryyoung

OK, I didn't find 'maxCount' property in the client api, do I need to set it on server side?.

fafzal avatar Sep 16 '15 12:09 fafzal

could you provide code on how you are using the client

t3hnar avatar Sep 16 '15 13:09 t3hnar

Here it is.

Health check code:

Future<Event> readEventResult = esConnection.readEvent(stream, null, false, null);
        readEventResult.onComplete(
                new OnComplete<Event>() {
                    @Override
                    public void onComplete(Throwable failure, Event success) throws Throwable {
                        if (failure != null) {
                            log.debug("Unhealthy, Failure: {}", failure);
                            result = HealthCheck.Result.unhealthy(failure.getMessage());
                        } else {
                            if(result != null && !result.isHealthy() )
                                log.debug("Back to healthy from failure: {}", result.getError());
                            result = HealthCheck.Result.healthy();
                        }
                    }
                },
                executionContext
        );

SubscribeToStream:

HashSet<SubscriptionObserver<BusinessEvent>> observers = new HashSet<>();
        observers.addAll(Arrays.asList(subscriptionObserver));
        return esConnection.subscribeToStreamFrom(
                stream,
                new JsonToBusinessEventSubscriptionObserver(
                        new FanOutSubscriptionObserver(observers)
                ),
                null,
                false,
                null
        );

fafzal avatar Sep 16 '15 14:09 fafzal

ok, so no direct read, Ok, then please configure it in your application.conf like: eventstore.read-batch-size = 50

t3hnar avatar Sep 16 '15 14:09 t3hnar

Strange, getting a same exception even though I set a batch size to 50.

            return new SettingsBuilder()
                    .keepRetrying()
                    .maxReconnections(-1)
                    .requireMaster(false)
                    .readBatchSize(50)
                    .operationTimeout(1, TimeUnit.MINUTES)
                    .cluster(
                            new ClusterSettingsBuilder()
                                    .clusterDns(clusterDns, clusterGossipPort)
                                    .maxDiscoverAttempts(Integer.MAX_VALUE - 1)
                                    .build()
                    );

fafzal avatar Sep 16 '15 14:09 fafzal

Does it take one minute to timeout or?

On Wed, Sep 16, 2015 at 5:48 PM, fafzal [email protected] wrote:

Strange, getting a same exception even though I set a batch size to 50.

        return new SettingsBuilder()
                .keepRetrying()
                .maxReconnections(-1)
                .requireMaster(false)
                .readBatchSize(50)
                .operationTimeout(1, TimeUnit.MINUTES)
                .cluster(
                        new ClusterSettingsBuilder()
                                .clusterDns(clusterDns, clusterGossipPort)
                                .maxDiscoverAttempts(Integer.MAX_VALUE - 1)
                                .build()
                );

— Reply to this email directly or view it on GitHub https://github.com/EventStore/EventStore.JVM/issues/42#issuecomment-140764167 .

Studying for the Turing test

gregoryyoung avatar Sep 16 '15 14:09 gregoryyoung

No. Its doesn't take 1m to timeout. Its throws an exception immediately after connecting to ES node.

[INFO] [09/16/2015 14:55:46.557] [default-akka.actor.default-dispatcher-12] [akka://default/user/$a] Connected to /10.3.0.33:1113
[INFO] [09/16/2015 14:55:46.557] [AuctionQueryApplication-akka.actor.default-dispatcher-2] [akka://AuctionQueryApplication/user/$a] Connected to /10.3.0.33:1113
[ERROR] [09/16/2015 14:55:46.608] [AuctionQueryApplication-akka.actor.default-dispatcher-11] [akka://AuctionQueryApplication/user/$c] eventstore.OperationTimeoutException: Operation hasn't got response from server for PackOut(ReadStreamEvents(Stream(auction),EventNumber(0),500,Forward,false,true),220f949c-4d02-4527-ad67-578bcdc64821,Some(UserCredentials(admin,***)))
WARN  [2015-09-16 14:55:46,624] nl.info.bva.platform.eventstore.FanOutSubscriptionObserver: Error!
! eventstore.OperationTimeoutException: Operation hasn't got response from server for PackOut(ReadStreamEvents(Stream(auction),EventNumber(0),500,Forward,false,true),220f949c-4d02-4527-ad67-578bcdc64821,Some(UserCredentials(admin,***)))

fafzal avatar Sep 16 '15 15:09 fafzal