Good afternoon!

I am trying to deploy deduplication-web-api using docker container registry.creatio.com/dup-web-api:3.0.12

 

I see this problem in the logs.

 

fail: Microsoft.AspNetCore.Server.Kestrel[13]
     Connection id "0HN5FOGURGKI1", Request id "0HN5FOGURGKI1:000000E2": An unhandled exception was thrown by the application.
     System.InvalidOperationException: Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead.
        at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseStream.Flush()
        at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
        at System.IO.StreamWriter.Dispose(Boolean disposing)
        at System.IO.TextWriter.Dispose()
        at App.Metrics.Formatters.Prometheus.Internal.AsciiFormatter.Write(Stream destination, IEnumerable`1 metrics, NewLineFormat newLine)
        at App.Metrics.Formatters.Prometheus.MetricsPrometheusTextOutputFormatter.WriteAsync(Stream output, MetricsDataValueSource metricsData, CancellationToken cancellationToken)
        at App.Metrics.AspNetCore.Endpoints.Middleware.MetricsEndpointMiddleware.Invoke(HttpContext context)
        at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

 

appsettings.json looks like this:

 

root@deduplication-web-api:/app# cat appsettings.json
{
 "Version": "1.0.0",
 "Logging": {
   "LogLevel": {
     "Default": "Warning"
   }
 },
 "Kestrel": {
   "AllowSynchronousIO": true
 },
 "AllowedHosts": "*",
 "ApplicationBasePath": "/",
 "MetricsOptions": {
   "Enabled": true,
   "ReportingEnabled": true,
   "GlobalTags": {
     "app": "deduplication-web-api",
     "env": "production"
   },
   "DefaultContextLabel": "deduplication-web-api"
 },
 "MetricsWebTrackingOptions": {
   "ApdexTSeconds": 0.1,
   "ApdexTrackingEnabled": false,
   "IgnoredHttpStatusCodes": [],
   "IgnoredRoutesRegexPatterns": [],
   "OAuth2TrackingEnabled": false
 },
 "MetricEndpointsOptions": {
   "MetricsEndpointEnabled": true,
   "MetricsTextEndpointEnabled": true,
   "EnvironmentInfoEndpointEnabled": true
 },
 "RabbitConfiguration": {
   "RabbitMQUri": "HIDDEN",
   "QueueName": "dup-start-deduplication-task",
   "ConnectAttempts": "5",
   "ReconnectInterval": "0.00:00:05",
   "NetworkRecoveryInterval": "0.00:00:05"
 },
 "RabbitPublisherConfiguration": {
   "QueueName": "dup-start-deduplication-task"
 },
 "DataServiceRestConfiguration": {
   "DataServiceUri": "http://deduplication-data-service/api"
 },
 "Logger4NetConfiguration": {
   "LoggerName": "bulk-deduplication-logger",
   "LoggerRepositoryName": "default",
   "LogFilePath": "/app/config/log4net.config"
 },
 "DuplicatesSearchConfiguration": {
   "DefaultMaxDuplicatesPerRecord": 100
 }
}

 

Can you please tell me what the problem could be?

Like 2

Like

3 comments

Hi Igor,

 

The basic appsettings.json does not mention "Kestrel": { "AllowSynchronousIO": true }. 

 

 

Could you please let us know if an error occurs without this parameter?

Sergii Zhmurko,


Yes, you are right, I found this solution on the internet but it didn't help.

Hi Igor,

 

Try redeploying the service with only the basic settings. If the error occurs again, please contact Creatio support, providing the logs of all containers and the docker-compose file you are using for deployment. 

Additionally, please include your server specifications in the request. We will then investigate the issue in more detail.

Show all comments