Cloudflare Timeout Issue with Git pull and Curl Request in AWS EC2 instance - wordpress

I have my WordPress project running in the AWS EC2 instance. I have my DNS managed in Cloudflare and it is proxied. When I did the setup of the project in AWS instance, for some days git pull and push and all the APIs were working fine. But suddenly after some time, I was not able to take the pull on the server due to a timeout issue.
Also from the WordPress form when I submit the form it should call the API but it gives me the 504 gateway timeout error.
So every time when I need to take a pull I have to reboot the server and then for 5 mins. everything works fine and then again it gives me the same error.
What should I do with Cloudflare? As per my knowledge, there must be something from Cloudflare as on the server-side I have tried everything for this kind of problem.

Related

Apache2 server getting too many connection requests

I am trying to deploy a Nodejs & WordPress website together on an ubuntu server and I am using apache2 for my server config. Everything works fine initially. But after some time my website start showing connection timeout in the browser and when I checked the Ubuntu machine then I found the following:
I checked the error log and increased the worker limit but then got this error again.
I also checked the tasks using htop command then I found this and as I am increasing the worker request number in the apache2 config file the tasks increase automatically.
I also checked which IP calling so many requests and then I found this:
Access logs file :
I have no idea what is going on here and don't know how to fix it. If anyonw know the solution to this problem then please reply.
Thanks

Wordpress not working after changing instance type on Google Cloud Platform

I changed my VM instance from "F1-micro" to "E2-micro". When I then restarted my machine, I couldn't access my webpage using the domain name, the webpage just shows an "Error 521" code - showing that my browser is working, CDN is working but the host has an erorr. When I paste the VMs IP address into my webpage, however, it show's the "Apache2 Debian Default Page".
Can somebody please help me with this?
The Error 521 message is caused by one of two situations:
First, check whether your WordPress site’s server is down. Even if everything else is configured properly, if your WordPress site’s server is offline, Cloudflare simply won’t be able to connect.
Second, your web server might be running fine but blocking Cloudflare’s requests. Because of how Cloudflare works, some server-side security solutions might inadvertently block Cloudflare’s IP addresses.
Cloudflare is a reverse proxy, all the traffic coming to your origin server will appear as if it’s coming from a small range of Cloudflare IPs (rather than each individual visitor’s unique IP address). Because of that, some security solutions will view high traffic from a limited number of IP addresses as an attack and block them.
Please check this link out in order to fix error 521 for Cloudflare and WordPress.
Turns out this problem was caused by my having installed the Debian Apache server package and it is causing collisions between it and the Apache shipped in the stack. Bitnami Stacks are completely self-contained and run independently of the rest of the software or libraries installed on your system.
So to fix this, all I had to do was run the following commands:
sudo systemctl stop apache2
sudo /opt/bitnami/ctlscript.sh restart

Unable to access website or SSH or FTP - Google Cloud and wordpress

I have a WordPress site hosted on Google Cloud, and was working very well.
With no apparent motive, stoped working and I can't access to it, neither the front panel or admin panel.
I can't access via FTP o SSH console.
The VM on Google cloud still running as far as I can see.
Errors I get:
When trying to access de website on Google Chrome:
ERR_CONNECTION_TIMED_OUT
When trying to access FTP via FileZilla:
Error: Connection timed out after 20 seconds of inactivity
Error: Could not connect to server
When trying to access SSH:
Connection via Cloud Identity-Aware Proxy Failed Code: 4003 Reason:
failed to connect to backend You may be able to connect without using
the Cloud Identity-Aware Proxy.
i just want to update this issue.
The problem was that the memory quota.
I've increased the amounth of memory, restarted de VM and all went back to work.
Thanks
This page with SSH troubleshooting steps might be able to help you.
The issue could be solved by trying these troubleshooting steps. I think it is likely that the first one might be the cause of your issue since you mentioned it did work before.
Does the instance have a full disk? Try to expand it!
Is the firewall correctly setup, check your firewall rules and ensure that the default-allow-ssh rule is present.
Check your IAM permissions, do you have the roles required to connect to the VM?
Enable the serial console from your instance settings, connect and review the logs, they might give you some useful insights.

Wordpress Server sending bad request to itself and crashing apache

Our Wordpress server has been choking itself. seemingly randomly, for the last 4 or 5 months. After a long process of troubleshooting various things I finally pinpointed it to 4-6 requests that show up in Apache. They're completely empty and they come from our own wordpress server IP. No VHost specified, no request path either.
These requests get stuck in Reading Request, and any subsequent legitimate requests get stuck in Sending Reply until the scoreboard is full. The site effectively goes down until we restart FPM and Apache.
I "fixed" this by banning our server's IP from making requests via htaccess. Our apache now stays up but we get error logs for access denied to 400.shtml (bad request). This works, but of course I really want to figure out what is causing these requests.
I've checked our cron jobs and removed all of the ones from old plugins but the requests still come in anywhere from every hour to every 3 hours. This doesn't match any of the remaining cron frequencies.
Any help is greatly appreciated, I'm at wits end.
Environment details:
Dedicated WHM box, wordpress running on a dedicated IP as a sub account.
Apache 2.4
PHP 7.2 with Zen OpCache
nginx reverse proxy (Engintron WHM plugin)
Cloudflare CDN.
No other wordpress cache plugins except for cloudflare.
No load balancers.

503 Service Unavailable - EC-2 / WordPress with NGINX and SSL Certified by Bitnami-4-9-8-1-r40

I have been trying to learn AWS EC-2 and installing WordPress by Bitnami. I was planning to move all my sites from cPanel to AWS in the future if I could pull this off.
I am having issues with constantly getting 503 Unavailable Error when I attached the Amazon Issued SSL.
I was able to create an Instance, Certificate, DNS via Route 53, Load Balancer, Security Group and Target successfully I just can't get the site up. :(
Public IP works though 54.237.218.136
What could go wrong?
503 gateway time out it is. well your configuration and services need a restart , As Amazon provided Certificate works with Load Balancer (Application or Classic)
503 is the gateway time out from php-fpm or Apache 2 As you haven't shared the logs to give you a more prise solution I would suggest to login on your EC2-Wordpress powered by Bitnami and run the following commands .
sudo /opt/bitnami/ctlscript.sh status
sudo /opt/bitnami/ctlscript.sh stop
sudo /opt/bitnami/ctlscript.sh start
Please follow this document as well: https://docs.bitnami.com/aws/faq/administration/control-services/
I'm sure that committed changes with the configuration has not been loaded yet as your EC2 is even not responding on this IP ,
I'm sure about the Load Balancer and certificate is not the problem here.
You can ping me if you need help with this it's not a really tough job.
Thanks

Resources