fix: Gitea Traefik routing and connection pool optimization
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 10m14s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Failing after 11m25s
Security Vulnerability Scan / Composer Security Audit (push) Has been cancelled
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 10m14s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Failing after 11m25s
Security Vulnerability Scan / Composer Security Audit (push) Has been cancelled
- Remove middleware reference from Gitea Traefik labels (caused routing issues) - Optimize Gitea connection pool settings (MAX_IDLE_CONNS=30, authentication_timeout=180s) - Add explicit service reference in Traefik labels - Fix intermittent 504 timeouts by improving PostgreSQL connection handling Fixes Gitea unreachability via git.michaelschiemer.de
This commit is contained in:
29
worker.php
29
worker.php
@@ -11,6 +11,8 @@ use App\Framework\DateTime\SystemHighResolutionClock;
|
||||
use App\Framework\Performance\MemoryMonitor;
|
||||
use App\Framework\Queue\Queue;
|
||||
use App\Framework\Worker\Worker;
|
||||
use App\Framework\Pcntl\PcntlService;
|
||||
use App\Framework\Pcntl\ValueObjects\Signal;
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
require __DIR__ . '/src/Framework/Debug/helpers.php';
|
||||
@@ -33,13 +35,26 @@ $worker = new Worker(
|
||||
$container->get(ConsoleOutput::class),
|
||||
);
|
||||
|
||||
pcntl_signal(SIGTERM, function () use ($worker) {
|
||||
$worker->stop();
|
||||
});
|
||||
|
||||
pcntl_signal(SIGINT, function () use ($worker) {
|
||||
$worker->stop();
|
||||
});
|
||||
// Setup signal handlers using PCNTL service if available
|
||||
try {
|
||||
$pcntlService = $container->get(PcntlService::class);
|
||||
$pcntlService->registerSignal(Signal::SIGTERM, function () use ($worker) {
|
||||
$worker->stop();
|
||||
});
|
||||
$pcntlService->registerSignal(Signal::SIGINT, function () use ($worker) {
|
||||
$worker->stop();
|
||||
});
|
||||
} catch (\Throwable $e) {
|
||||
// Fallback to direct pcntl_signal if PCNTL service not available
|
||||
if (function_exists('pcntl_signal')) {
|
||||
pcntl_signal(SIGTERM, function () use ($worker) {
|
||||
$worker->stop();
|
||||
});
|
||||
pcntl_signal(SIGINT, function () use ($worker) {
|
||||
$worker->stop();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$worker->start();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user