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
74 lines
2.9 KiB
YAML
74 lines
2.9 KiB
YAML
---
|
|
# Test Gitea After Connection Pool Fix
|
|
- name: Test Gitea After Connection Pool Fix
|
|
hosts: production
|
|
gather_facts: no
|
|
become: no
|
|
vars:
|
|
gitea_stack_path: "{{ stacks_base_path }}/gitea"
|
|
gitea_url: "https://{{ gitea_domain }}"
|
|
|
|
tasks:
|
|
- name: Test Gitea health endpoint
|
|
ansible.builtin.uri:
|
|
url: "{{ gitea_url }}/api/healthz"
|
|
method: GET
|
|
validate_certs: false
|
|
timeout: 35
|
|
register: gitea_test
|
|
changed_when: false
|
|
|
|
- name: Check Gitea logs for connection pool messages
|
|
ansible.builtin.shell: |
|
|
cd {{ gitea_stack_path }}
|
|
docker compose logs gitea --tail 100 | grep -iE "timeout.*authentication|connection.*pool|MAX_OPEN_CONNS|database.*pool" | tail -20 || echo "No connection pool messages found"
|
|
register: gitea_logs_check
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Check Postgres logs for authentication timeouts
|
|
ansible.builtin.shell: |
|
|
cd {{ gitea_stack_path }}
|
|
docker compose logs postgres --tail 50 | grep -iE "timeout.*authentication|authentication.*timeout" | tail -10 || echo "No authentication timeout messages found"
|
|
register: postgres_logs_check
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Display test results
|
|
ansible.builtin.debug:
|
|
msg: |
|
|
================================================================================
|
|
GITEA CONNECTION POOL FIX - TEST RESULTS
|
|
================================================================================
|
|
|
|
Health Check Result:
|
|
- Status: {{ gitea_test.status | default('TIMEOUT') }}
|
|
- Response Time: {{ gitea_test.elapsed | default('N/A') }}s
|
|
{% if gitea_test.status | default(0) == 200 %}
|
|
✅ Gitea is reachable
|
|
{% else %}
|
|
❌ Gitea returned status {{ gitea_test.status | default('TIMEOUT') }}
|
|
{% endif %}
|
|
|
|
Gitea Logs (Connection Pool):
|
|
{{ gitea_logs_check.stdout }}
|
|
|
|
Postgres Logs (Authentication Timeouts):
|
|
{{ postgres_logs_check.stdout }}
|
|
|
|
================================================================================
|
|
INTERPRETATION:
|
|
================================================================================
|
|
|
|
{% if 'timeout.*authentication' in gitea_logs_check.stdout | lower or 'timeout.*authentication' in postgres_logs_check.stdout | lower %}
|
|
⚠️ Authentication timeout messages still present
|
|
→ Connection pool settings may need further tuning
|
|
→ Consider increasing MAX_OPEN_CONNS or authentication_timeout
|
|
{% else %}
|
|
✅ No authentication timeout messages found
|
|
→ Connection pool fix appears to be working
|
|
{% endif %}
|
|
|
|
================================================================================
|
|
|