diff --git a/MP.RIOC/MP.RIOC.csproj b/MP.RIOC/MP.RIOC.csproj
index 2b28390d..3dfd370b 100644
--- a/MP.RIOC/MP.RIOC.csproj
+++ b/MP.RIOC/MP.RIOC.csproj
@@ -5,7 +5,7 @@
enable
enable
MP.RIOC
- 8.16.2606.1217
+ 8.16.2606.1218
InProcess
diff --git a/MP.RIOC/Program.cs b/MP.RIOC/Program.cs
index b122a104..a1f35daf 100644
--- a/MP.RIOC/Program.cs
+++ b/MP.RIOC/Program.cs
@@ -10,6 +10,10 @@ using System.Diagnostics;
using System.Net;
using System.Reflection;
+
+// Forza il ThreadPool a tenere pronti almeno 500 thread per i calcoli e 500 per l'I/O di rete
+ThreadPool.SetMinThreads(500, 500);
+
var builder = WebApplication.CreateBuilder(args);
// RECUPERO L'AMBIENTE REALE (Che ora IIS passa correttamente come 'Staging')
diff --git a/MP.RIOC/Resources/ChangeLog.html b/MP.RIOC/Resources/ChangeLog.html
index aa4396fe..5e1d7f8b 100644
--- a/MP.RIOC/Resources/ChangeLog.html
+++ b/MP.RIOC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MP-RIOC
- Versione: 8.16.2606.1217
+ Versione: 8.16.2606.1218
Note di rilascio:
-
diff --git a/MP.RIOC/Resources/VersNum.txt b/MP.RIOC/Resources/VersNum.txt
index d947c970..d19c598e 100644
--- a/MP.RIOC/Resources/VersNum.txt
+++ b/MP.RIOC/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2606.1217
+8.16.2606.1218
diff --git a/MP.RIOC/Resources/manifest.xml b/MP.RIOC/Resources/manifest.xml
index 9512a461..3ec9a26b 100644
--- a/MP.RIOC/Resources/manifest.xml
+++ b/MP.RIOC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2606.1217
+ 8.16.2606.1218
https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/MP.RIOC.zip
https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/ChangeLog.html
false
diff --git a/MP.RIOC/Services/MetricsDbFlushService.cs b/MP.RIOC/Services/MetricsDbFlushService.cs
index 56510506..0fde0e93 100644
--- a/MP.RIOC/Services/MetricsDbFlushService.cs
+++ b/MP.RIOC/Services/MetricsDbFlushService.cs
@@ -33,8 +33,23 @@ namespace MP.RIOC.Services
{
try
{
- await ProcessDayLiveMetricsAsync();
- await ProcessHourLiveMetricsAsync();
+ //await ProcessDayLiveMetricsAsync();
+ //await ProcessHourLiveMetricsAsync();
+
+ // 2. ๐ COSTRINGIAMO IL FLUSH A GIRARE IN BACKGROUND
+ // Task.Run prende l'intera esecuzione e la sposta su un thread separato.
+ // In questo modo, anche se l'Upsert fa calcoli pesanti o blocca momentaneamente,
+ // i thread principali di YARP rimangono liberi al 100% di rispondere a wrk in 2ms.
+ await Task.Run(async () =>
+ {
+ // Cede immediatamente il controllo per evitare di monopolizzare il thread corrente
+ await Task.Yield();
+
+ // Esegue i tuoi due metodi (che manterranno i loro scope interni asincroni)
+ await ProcessDayLiveMetricsAsync();
+ await ProcessHourLiveMetricsAsync();
+ }, stoppingToken);
+ // poi attendo...
await Task.Delay(TimeSpan.FromSeconds(interval), stoppingToken);
}
catch (TaskCanceledException) { break; }
diff --git a/MP.RIOC/Services/RouteManager.cs b/MP.RIOC/Services/RouteManager.cs
index 23d45c90..26e9994f 100644
--- a/MP.RIOC/Services/RouteManager.cs
+++ b/MP.RIOC/Services/RouteManager.cs
@@ -98,8 +98,16 @@ namespace MP.RIOC.Services
// ESECUZIONE FORWARDING
var error = await _forwarder.SendAsync(context, destBase, _httpClientInvoker, _forwarderConfig, HttpTransformer.Default, context.RequestAborted);
- // commento transformer custom
- //var error = await _forwarder.SendAsync(context, destBase, _httpClientInvoker, _forwarderConfig, _transformer, context.RequestAborted);
+ // Se YARP fallisce per un problema di connessione interrotta (come l'errore 995)
+ // e NON รจ un problema di sintassi della richiesta o di autorizzazione
+ if (error != ForwarderError.None &&
+ error != ForwarderError.RequestBodyClient &&
+ error != ForwarderError.NoAvailableDestinations)
+ {
+ // Fai un secondo e ultimo tentativo immediato prima di dare errore al client
+ Log.Warn($"Micro-reset di rete rilevato ({error}). Tento il secondo invio immediato...");
+ error = await _forwarder.SendAsync(context, destBase, _httpClientInvoker, _forwarderConfig, HttpTransformer.Default, context.RequestAborted);
+ }
sw.Stop();
_stats.RecordDuration(sKey, sw.Elapsed);
diff --git a/MP.SPEC/Components/ProdKit/GestKitPodl.razor.cs b/MP.SPEC/Components/ProdKit/GestKitPodl.razor.cs
index e15fd13e..4492444f 100644
--- a/MP.SPEC/Components/ProdKit/GestKitPodl.razor.cs
+++ b/MP.SPEC/Components/ProdKit/GestKitPodl.razor.cs
@@ -169,6 +169,7 @@ namespace MP.SPEC.Components.ProdKit
protected async Task toggleClosed()
{
hasOdl = !hasOdl;
+ currPage = 1;
await EC_HasOdl.InvokeAsync(hasOdl);
}
diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj
index ba8925e4..bfdfb22e 100644
--- a/MP.SPEC/MP.SPEC.csproj
+++ b/MP.SPEC/MP.SPEC.csproj
@@ -5,7 +5,7 @@
enable
enable
MP.SPEC
- 8.16.2606.1216
+ 8.16.2606.1218
1800a78a-6ff1-40f9-b490-87fb8bfc1394
en
diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html
index c77d7379..d8370644 100644
--- a/MP.SPEC/Resources/ChangeLog.html
+++ b/MP.SPEC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
-
Versione: 8.16.2606.1216
+ Versione: 8.16.2606.1218
Note di rilascio:
-
diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt
index 90643774..d19c598e 100644
--- a/MP.SPEC/Resources/VersNum.txt
+++ b/MP.SPEC/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2606.1216
+8.16.2606.1218
diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml
index dd7203ef..924c3e2c 100644
--- a/MP.SPEC/Resources/manifest.xml
+++ b/MP.SPEC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2606.1216
+ 8.16.2606.1218
https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip
https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html
false