ProductionForecastService.ForecastGeneration

// Id: #174600
using EnergyDataHub.Data.Services;

var productionForecastService = Activate<ProductionForecastService>();
await productionForecastService.ForecastGeneration(
    FromJson<Location>("{\"Id\":1,\"Guid\":\"9b78cdd4-8dd4-49ba-a1f4-c8e90a9a2285\",\"Name\":\"Babindub\",\"Latitude\":44.096917,\"Longitude\":15.34175,\"Country\":null,\"CountryId\":5,\"WeatherData\":null}"),
    <VALUE IS TOO BIG>,
    FromJson<ForecastLocationSettings>("{\"WeatherProvider\":1,\"LocationName\":\"Babindub\",\"InstallationYear\":2019,\"ModelPath\":\"/root/predcition/models/X_Kosore_model.keras\",\"ScalerPath\":\"/root/predcition/models/X_Kosore_scaler.gz\",\"OutputFactor\":2.97}"));

Parameters

CurrentCulture
""
CurrentUICulture
""

State

03/09/2026 02:49:12 (+3.864s) Failed

An exception occurred during performance of the job.

System.InvalidOperationException (edh:1332730)

Could not get a value of the job parameter `CurrentUICulture`. See inner exception for details.

System.InvalidOperationException: Could not get a value of the job parameter `CurrentUICulture`. See inner exception for details. ---> Npgsql.PostgresException: 53300: remaining connection slots are reserved for roles with the SUPERUSER attribute
   at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
   at Npgsql.Internal.NpgsqlConnector.<Open>g__OpenCore|213_1(NpgsqlConnector conn, SslMode sslMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken, Boolean isFirstAttempt)
   at Npgsql.Internal.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
   at Npgsql.PoolingDataSource.OpenNewConnector(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
   at Npgsql.PoolingDataSource.<Get>g__RentAsync|33_0(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
   at Npgsql.NpgsqlConnection.<Open>g__OpenAsync|42_0(Boolean async, CancellationToken cancellationToken)
   at Hangfire.PostgreSql.PostgreSqlStorage.CreateAndOpenConnection()
   at Hangfire.PostgreSql.PostgreSqlStorage.UseConnection[T](DbConnection dedicatedConnection, Func`2 func)
   at Hangfire.Server.PerformContext.GetJobParameter[T](String name, Boolean allowStale)

   --- End of inner exception stack trace ---
   at Hangfire.Server.PerformContext.GetJobParameter[T](String name, Boolean allowStale)
   at Hangfire.CaptureCultureAttribute.OnPerforming(PerformingContext context)
   at Hangfire.Server.BackgroundJobPerformer.InvokeOnPerforming(KeyValuePair`2 ctx)

+2h 11m Processing

Server:
edh:1332730
Worker:
f1a1469c

+21ms Enqueued

03/09/2026 00:37:33 Created