Yehia A.Salam
Yehia A.Salam

Reputation: 2028

Apache becomes very slow after 4-5 hours

I'm running an apache 2.4 server (Oracle OCI Ampere A1 with 24GB RAM and Oracle Linux 9) with a reverse proxy to a local Kestrel server (to server a dotnet application). Everything is working fine. However, each 4-5 hours Apache becomes really slow, even serving static content, and needs a restart to get up to speed.

No swapping is happening, RAM is 5x more than needed, idle workers are below 250, CPU idle, very moderate load. Everything is working as it should.

enter image description here

The only thing im getting in apache error log is:

[client 194.65.137.130:65472] AH03307: ap_proxy_transfer_between_connections: error on origin - ap_pass_brigade
[Mon Sep 16 17:45:10.681112 2024] [proxy:error] [pid 422078:tid 422122] [client 194.65.137.130:65472] AH10221: proxy: websocket: client flushing failed (-102)
[Mon Sep 16 17:45:16.730144 2024] [proxy:error] [pid 422078:tid 422106] (70014)End of file found: [client 186.22.245.138:36178] AH03307: ap_proxy_transfer_between_connections: error on origin - ap_pass_brigade
[Mon Sep 16 17:45:16.730350 2024] [proxy:error] [pid 422078:tid 422106] [client 186.22.245.138:36178] AH10221: proxy: websocket: client flushing failed (-102)

And I feel its unrelated to the slow down. Can you please advise on how I should tackle this. Not event sure how I should troubleshoot it.

Below is the vhosts config:

# Admin email, Server Name (domain name) and any aliases
ServerName  app.website.com
ServerAlias  www.app.website.com

DocumentRoot /var/www/website/app
RequestHeader set X-Forwarded-Proto "https"

ProxyPreserveHost On
ProxyPass / http://127.0.0.1:5000/
ProxyPassReverse / http://127.0.0.1:5000/

RewriteEngine on 
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC] 
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC] 
RewriteRule /(.*) ws://127.0.0.1:5000/$1 [P]

# Set the logs
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
ErrorLog /var/www/website/logs/app-error.log


# SSL
SSLEngine on
SSLCertificateFile /var/www/website/app.website-2024.crt
SSLCertificateKeyFile /var/www/website/app.website-2024.key
SSLCertificateChainFile /var/www/website/app.website-2024.ca-bundle

Upvotes: 0

Views: 58

Answers (0)

Related Questions