Add Apache ProxyTimeout configuration for SSE support

Created apache-sse-config.conf with required Apache settings to support
long-running SSE connections. Apache's mod_proxy_fcgi has a default
timeout of 30-60 seconds which kills SSE connections prematurely.

The configuration sets ProxyTimeout to 21600 seconds (6 hours) to match
HAProxy's timeout and allow long streaming sessions.

Added note to .htaccess explaining this requirement, as ProxyTimeout
cannot be set in .htaccess and must be configured in the virtual host.

To fix 504 Gateway Timeout errors:
1. Add ProxyTimeout directive to Apache virtual host config
2. Reload Apache
3. Test SSE connection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-26 15:29:56 -08:00
parent 9feb17b734
commit 2870d45bdc
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# Apache configuration snippet for Server-Sent Events (SSE) support
# Add this to your Apache virtual host configuration
#
# Location: Typically in /etc/apache2/sites-available/your-site.conf
# or wherever your virtual host is configured
# Increase timeout for SSE connections (6 hours to match HAProxy)
# This prevents Apache from killing long-running SSE connections
ProxyTimeout 21600
# Alternative: Set timeout specifically for SSE endpoints
# Uncomment and adjust the path if you want to be more specific
# <LocationMatch "^/transcribe/server\.php">
# ProxyTimeout 21600
# </LocationMatch>
# Note: After adding this to your virtual host config, reload Apache:
# sudo systemctl reload apache2
# or
# sudo service apache2 reload