Projection stuck in LoadingState/LoadStateRequested, attempt to edit or delete returns HTTP 408

I have a projection which simply counts the number of times each event type occurred - no emitting or linking. It ran through about 1.5 million events fine. I then reset it and it entered into a LoadingState/LoadStateRequested status with -1% completion. Now I can’t edit it, disable it, or delete it. When I attempt any of those operations via HTTP API I the server returns:

HTTP 408 Server was unable to handle request in time

``

Which version are you running?

Correction, that was 15 million events not 1.5 million.

The v2.0.1 binaries from download. It seems I’ve seen the same or similar thing when there was a syntax error in the JavaScript projection definition.

Do you see anything on log file?

I believe the error messages on trunk are now quite a bit better as we move towards stable projections. Should be setting up public CI builds of dev this weekend.

Cheers,

James

The error log is attached. Potentially related entries:

[PID:00864:015 2013.10.04 13:15:17.167 ERROR QueuedHandlerMRES ] Error while processing message EventStore.Core.Messages.ClientMessage+ReadStreamEventsBackwardCompleted in queued handler ‘Projection Core #0’.
System.NotSupportedException: Conversion from EventTypeIndex to Stream position tag is not supported

``

[PID:00864:014 2013.10.04 13:15:33.424 ERROR QueuedHandlerMRES ] Error while processing message EventStore.Projections.Core.Messages.ProjectionManagementMessage+Reset in queued handler ‘Projections Master’.
System.NotSupportedException: Specified method is not supported.

``

[PID:00864:015 2013.10.04 13:16:05.593 ERROR QueuedHandlerMRES ] Error while processing message EventStore.Core.Messages.ClientMessage+ReadStreamEventsBackwardCompleted in queued handler ‘Projection Core #0’.
System.NotSupportedException: Conversion from EventTypeIndex to Stream position tag is not supported

``

[PID:00864:014 2013.10.04 13:45:15.732 ERROR ProjectionManager ] The ‘totals’ projection faulted due to ‘Cannot enqueue an out-of-order task. The projection position is currently unknown.’
[PID:00864:015 2013.10.04 13:46:53.576 ERROR QueuedHandlerMRES ] Error while processing message EventStore.Core.Messages.ClientMessage+ReadStreamEventsBackwardCompleted in queued handler ‘Projection Core #0’.
System.NotSupportedException: Conversion from EventTypeIndex to Stream position tag is not supported

``

[PID:00864:014 2013.10.04 13:46:59.868 ERROR QueuedHandlerMRES ] Error while processing message EventStore.Projections.Core.Messages.ProjectionManagementMessage+Reset in queued handler ‘Projections Master’.
System.NotSupportedException: Specified method is not supported.

``

es-err-log.log (21.2 KB)

Thank you, Lev. I’ll check how it could get into this state.

-yuriy

Yuriy,

I seem to be having a similar issue:

[PID:09520:020 2013.11.14 01:53:17.395 ERROR QueuedHandlerMRES ] Error while processing message EventStore.Core.Messages.ClientMessage+ReadStreamEventsBackwardCompleted in queued handler ‘Projection Core #2’.

System.NotSupportedException: Conversion from Position to MultiStream position tag is not supported

at EventStore.Projections.Core.Services.Processing.MultiStreamPositionTagger.AdjustTag(CheckpointTag tag) in c:\BuildAgent1\work\oss\windows\releasebuilds\src\EventStore\EventStore.Projections.Core\Services\Processing\MultiStreamPositionTagger.cs:line 100

at EventStore.Projections.Core.Services.Processing.CheckpointTagVersion.AdjustBy(PositionTagger tagger, ProjectionVersion version) in c:\BuildAgent1\work\oss\windows\releasebuilds\src\EventStore\EventStore.Projections.Core\Services\Processing\CheckpointTagExtensions.cs:line 52

at EventStore.Projections.Core.Services.Processing.EmittedStream.ReadStreamEventsBackwardCompleted(ReadStreamEventsBackwardCompleted message, CheckpointTag upTo) in c:\BuildAgent1\work\oss\windows\releasebuilds\src\EventStore\EventStore.Projections.Core\Services\Processing\EmittedStream.cs:line 267

at EventStore.Core.Messaging.RequestResponseDispatcher`2.Handle(TResponse message) in c:\BuildAgent1\work\oss\windows\releasebuilds\src\EventStore\EventStore.Core\Messaging\RequestResponseDispatcher.cs:line 86

at EventStore.Core.Bus.MessageHandler`1.TryHandle(Message message) in c:\BuildAgent1\work\oss\windows\releasebuilds\src\EventStore\EventStore.Core\Bus\MessageHandler.cs:line 60

at EventStore.Core.Bus.InMemoryBus.Publish(Message message) in c:\BuildAgent1\work\oss\windows\releasebuilds\src\EventStore\EventStore.Core\Bus\InMemoryBus.cs:line 350

at EventStore.Core.Bus.QueuedHandlerMRES.ReadFromQueue(Object o) in c:\BuildAgent1\work\oss\windows\releasebuilds\src\EventStore\EventStore.Core\Bus\QueuedHandlerMRES.cs:line 141

All projections are missing from the Projection page in UI.

Jakub

Jakub,

the “Conversion from Position to MultiStream position tag is not supported” message means that you had a

fromAll() projection

that was later edited to be a

fromStreams([…]) projection.

There is no easy way to support this. You can reset the projection to restart it from the beginning (including emitting all the results one more time).

If you get this error somehow else let me know.

thank you

-yuriy

Thank you, Yuriy. That is the case.

My problem is that I cannot see any projection in the Web UI so I cannot reset them.

Can I do it programatically?

Jakub

You can manage projections using the HTTP API

curl -XPOST “http://localhost:2113/projection/{projection}/command/disable” -d “” -H “Content-Type:application/json” -H “Authorization:Basic {base64encodedUserAndPassword}”

curl -XPUT “http://localhost:2113/projection/{projection}/query?emit=yes” --data-binary @{projectionFilePath} -H “Content-Type:application/json” -H “Authorization:Basic {base64encodedUserAndPassword}”

curl -XPOST “http://localhost:2113/projection/{projection}/command/reset” -d “” -H “Content-Type:application/json” -H “Authorization:Basic {base64encodedUserAndPassword}”

curl -XPOST “http://localhost:2113/projection/{projection}/command/enable” -d “” -H “Content-Type:application/json” -H “Authorization:Basic {base64encodedUserAndPassword}”

Jakub,

can you share your DB with us so I can find out why you don’t see projections on UI?

-yuriy

Hello Yuriy,

Yes, let me know how you want it delivered.
Please note that the database contains sensitive data.

Jakub

Hi Jakub,

If you email me off list (james at geteventstore com will do) I can arrange a secure upload if you’re happy you give us the database for diagnostics.

James

Jakub,

Thank you, I received DB and find out why projections do not appear on UI. I’m fixing that. I’ll delete the DB after that,

The problem is with serializing NaN value by Newtonsoft.Json and V8 unable to parse it. I’ll post post update on this here.

-yuriy

Jakub,

I’ve pushed the fix for this problem into dev branch.

You can also fix the problem in your DB without updating the ES version. All you need to do is to disable/enable $users projections.

You can do it by running padmin.exe

padmin.exe disable $users admin changeit

padmin.exe enable $users admin changeit

best regards

Yuriy

Thank you for a quick response, Yuriy!

I’ll try running admin tool and will report the results here.

Jakub

Yuriy,

Disabling/Enabling users projection worked.

Thank you very much for your help!

Much appreciated,

Jakub