GET with id returns 500, DELETE and PUT work fine

I installed squidex with helm as described here:
https://docs.squidex.io/01-getting-started/installation/platforms/install-on-kubernetes
I can add and delete content using code, Postman and curl. I verify this in the web view of contents. What I cannot do is get the data. I receive StatusCode 500 every time.
I am using /api/content/{app}/{schema}/{id}
What can this possibly be? thanks!

I have…

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [ ] Bug report
  • [X] Performance issue
  • [ ] Documentation issue or request

Current behavior

I can add and delete content using code, Postman and curl. I verify this in the web view of contents. What I cannot do is get the data. I receive StatusCode 500 every time.
I am using /api/content/{app}/{schema}/{id}

Expected behavior

When I do a GET I should receive data

Minimal reproduction of the problem

curl URL/api/content/{app}/{schema}/{id}
-H “Accept: application/json”
-H "Authorization: Bearer {token}

Environment

App Name: spectrum

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [X] Self hosted with other version
  • [ ] Cloud version

Version: Kubernetes installed with helm

Browser:

  • [ ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:
I can add and delete with no issues.

Weird, how do you host it? Can you use the normal Support Category and fill in the template?

If you get a 500, you should have an exception somewhere in the logs.

“exception”:{“type”:“System.OperationCanceledException”,“message”:“The operation was canceled.”,“stackTrace”:" at System.Threading.CancellationToken.ThrowOperationCanceledException()\n at MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChangedHelper.HandleCompletedTask(Task completedTask)\n at MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChangedAsync(IServerSelector selector, ClusterDescription description, Task descriptionChangedTask, TimeSpan timeout, CancellationToken cancellationToken)\n at MongoDB.Driver.Core.Clusters.Cluster.SelectServerAsync(IServerSelector selector, CancellationToken cancellationToken)\n at MongoDB.Driver.Core.Clusters.IClusterExtensions.SelectServerAndPinIfNeededAsync(ICluster cluster, ICoreSessionHandle session, IServerSelector selector, CancellationToken cancellationToken)\n at MongoDB.Driver.Core.Bindings.ReadPreferenceBinding.GetReadChannelSourceAsync(CancellationToken cancellationToken)\n at MongoDB.Driver.Core.Operations.RetryableReadContext.InitializeAsync(CancellationToken cancellationToken)\n at MongoDB.Driver.Core.Operations.RetryableReadContext.CreateAsync(IReadBinding binding, Boolean retryRequested, CancellationToken cancellationToken)\n at MongoDB.Driver.Core.Operations.FindOperation\u00601.ExecuteAsync(IReadBinding binding, CancellationToken cancellationToken)\n at MongoDB.Driver.OperationExecutor.ExecuteReadOperationAsync[TResult](IReadBinding binding, IReadOperation\u00601 operation, CancellationToken cancellationToken)\n at MongoDB.Driver.MongoCollectionImpl\u00601.ExecuteReadOperationAsync[TResult](IClientSessionHandle session, IReadOperation\u00601 operation, ReadPreference readPreference, CancellationToken cancellationToken)\n at MongoDB.Driver.MongoCollectionImpl\u00601.UsingImplicitSessionAsync[TResult](Func\u00602 funcAsync, CancellationToken cancellationToken)\n at MongoDB.Driver.IAsyncCursorSourceExtensions.FirstOrDefaultAsync[TDocument](IAsyncCursorSource\u00601 source, CancellationToken cancellationToken)\n at Squidex.Domain.Apps.Entities.MongoDb.Contents.Operations.QueryById.QueryAsync(ISchemaEntity schema, DomainId id, CancellationToken ct) in /src/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryById.cs:line 39\n at Squidex.Domain.Apps.Entities.MongoDb.Contents.MongoContentCollection.FindContentAsync(ISchemaEntity schema, DomainId id, CancellationToken ct) in /src/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentCollection.cs:line 166\n at Squidex.Domain.Apps.Entities.Contents.Queries.ContentQueryService.FindCoreAsync(Context context, DomainId id, ISchemaEntity schema, CancellationToken ct) in /src/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryService.cs:line 255\n at Squidex.Domain.Apps.Entities.Contents.Queries.ContentQueryService.FindAsync(Context context, String schemaIdOrName, DomainId id, Int64 version, CancellationToken ct) in /src/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryService.cs:line 82\n at Squidex.Areas.Api.Controllers.Contents.ContentsController.GetContent(String app, String schema, DomainId id) in /src/src/Squidex/Areas/Api/Controllers/Contents/ContentsController.cs:line 216\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeActionMethodAsync\u003Eg__Logged|12_1(ControllerActionInvoker invoker)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeNextActionFilterAsync\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeInnerFilterAsync\u003Eg__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeNextExceptionFilterAsync\u003Eg__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)"

Please format your logs properly next time.

This is a timeout. The default timeout for Find (by ID) is 1sec. It is usually more than enough, it should take like 10ms or so get an item from MongoDB. I cannot answer you, why it takes so long, it depends on your environment. You can change the value in the settings:

But I do not recommend it, because it keeps your instance stable under high load.

I think in newer versions a proper timeout is returned.

Found the source of the problem, the helm chart brings up an ingress even when it is set for false. Incoming traffic finds its way in with delete and put, but outgoing traffic falls flat.

The official helm chart? The last time I tested it, it was working fine for me. But an ingress really depends on the implementation.

Yes, the official helm chart. The implementation I have doesn’t require an ingress to be setup by squidex, so ingress: enabled: false should handle that, but does not.