Rimossi comandi aggiuntivi nel DataSource
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good

(cherry picked from commit 9f76fcfc72)
This commit is contained in:
2025-09-04 08:42:30 +02:00
parent 18e69f0195
commit 1d07f15169

View File

@@ -85,30 +85,28 @@ public class DataSource extends BasicDataSource {
this.setMinIdle(5); // Non scendere sotto 5
// Timeout ottimizzati per performance massime
this.setMaxWaitMillis(2000); // Ridotto a 2 secondi
// this.setMaxWaitMillis(-1L); // Infinito (DEFAULT)
// Validazione veloce ed efficiente
this.setValidationQuery("SELECT 1");
this.setValidationQueryTimeout(60); // Ridotto a 1 secondo
this.setTestOnBorrow(true); // Testa quando prendi la connessione
this.setTestOnReturn(false); // Non testare quando restituisci (performance)
this.setValidationQueryTimeout(5); // Ridotto a 1 secondo
this.setTestWhileIdle(true); // Testa connessioni idle
// Eviction ottimizzata per READ_UNCOMMITTED
this.setTimeBetweenEvictionRunsMillis(30000); // Ogni 30 secondi
this.setMinEvictableIdleTimeMillis(180000); // 3 minuti (ridotto da 5)
this.setNumTestsPerEvictionRun(5); // Testa più connessioni per volta
// this.setTimeBetweenEvictionRunsMillis(1 * 1000); // Ogni 30 secondi
// this.setMinEvictableIdleTimeMillis(3 * 60 * 1000); // 3 minuti (ridotto da 5)
// this.setNumTestsPerEvictionRun(5); // Testa più connessioni per volta
// Connection leak protection
this.setRemoveAbandonedOnBorrow(true);
this.setRemoveAbandonedOnMaintenance(true);
this.setRemoveAbandonedTimeout(60 * 10); // 60 secondi
// this.setRemoveAbandonedOnBorrow(true);
// this.setRemoveAbandonedOnMaintenance(true);
// this.setRemoveAbandonedTimeout(60 * 10); // 60 secondi
this.setLogAbandoned(UtilityDebug.isDebugExecution()); // Disabilita in produzione per performance
// Performance boosts massimi
this.setPoolPreparedStatements(true);
this.setMaxOpenPreparedStatements(200);
this.setCacheState(true);
// this.setMaxOpenPreparedStatements(200);
// this.setCacheState(true);
this.setFastFailValidation(true);
// Ottimizzazioni specifiche per SQL Server con READ_UNCOMMITTED