bitnami / vms

Bitnami VMs
https://bitnami.com
Other
206 stars 43 forks source link

[Wordpress] Having Apache High CPU and 502 errors #1428

Closed mazambadar closed 6 months ago

mazambadar commented 7 months ago

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

7065f30d-0285-ef8b-a480-801c561274bc

bndiagnostic output

===== Begin of bndiagnostic tool output =====

✓ Resources: No issues found
? Connectivity: Found possible issues
✓ Mariadb: No issues found
✓ Processes: No issues found
✓ Wordpress: No issues found
? Apache: Found possible issues
✓ Php: No issues found

[Connectivity]

Server ports 22, 80 and/or 443 are not publicly accessible. Please check the following guide to open server ports for remote access:

https://docs.bitnami.com/general/faq/administration/use-firewall/

[Apache]

Press [Enter] to continue: Found recent error or warning messages in the Apache error log.

[Sat Mar 02 17:04:26.578751 2024] [proxy_fcgi:error] [pid 1032:tid 140317713983232] (104)Connection reset by peer: [client ip_address:34642] AH01075: Error dispatching request to : , referer: https://www.petstruehouse.co.uk/wp-admin/post.php?post=21413&action=edit [Sat Mar 02 17:04:27.838179 2024] [proxy:error] [pid 1796:tid 140315331602176] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/bitnami/php/var/run/www.sock (www-fpm:8000) failed [Sat Mar 02 17:04:27.838301 2024] [proxy_fcgi:error] [pid 1796:tid 140315331602176] [client ip_address:24068] AH01079: failed to make connection to backend: httpd-UDS


Please check the following guide to troubleshoot server issues:

https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-erro
rs-apache/

===== End of bndiagnostic tool output =====

### bndiagnostic was not useful. Could you please tell us why?

Guides are not relevant

### Describe your issue as much as you can

Hi Bitnami Team, 

I can see my aws lightsail firewall is opened but I am receiving these errors. 

I am having high CPU usage issue with the apache server and CPU shoots up above sustainable zone and then server stopped working. I recently increased CPU to 4 and memory to 16GB but issue still not resolved. 

Please see attached log file and let me know how to fix this. 
jotamartos commented 7 months ago

There is a similar issue here, could you please take a look?

https://github.com/bitnami/vms/issues/1370

sislay11 commented 7 months ago

Experiencing high CPU usage on your Apache server along with 502 errors can be indicative of various issues. Here are some steps you can take to troubleshoot and resolve the problem:

Check Apache Error Logs:

Examine the Apache error logs (usually found in /var/log/apache2/error.log or a similar path depending on your server configuration) for any error messages or warnings. This can provide insights into the root cause of the issues.

Analyze Apache Access Logs:

Review the Apache access logs to identify any unusual patterns or an increase in traffic that might be causing the high CPU usage. This information can help you determine if the server is experiencing a sudden spike in requests.

Check Server Resource Usage:

Use system monitoring tools (e.g., top, htop, or sar) to check the overall system resource usage. Identify if Apache is the primary consumer of CPU resources or if other processes are contributing to the high usage.

Optimize Apache Configuration:

Review your Apache configuration settings. Ensure that you are not running more Apache processes than necessary. Adjust the MaxRequestWorkers and other relevant settings based on your server's capacity.

Check for DDoS Attacks:

If you see a sudden increase in traffic, it's possible that your server is under a Distributed Denial of Service (DDoS) attack. Consider implementing security measures to mitigate DDoS attacks.

github-actions[bot] commented 6 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 6 months ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.