Explore information related to 502 bad gateway


Plesk error pool seems busy - Fix it Now ?


This article covers methods to resolve Plesk error pool seems busy. This error happens when the PHP-FPM pm.max_children has been reached by the website(s). 


To Increasing pm.max_children for one domain via a command-line interface:

1. Create a php.ini file in domain's system directory /var/www/vhosts/system/example.com/conf/:

$ touch /var/www/vhosts/system/example.com/conf/php.ini

2. Open the php.ini file in any text editor (for example, vi editor) and add the following records:

[php-fpm-pool-settings]
pm.max_children = 20

3. Save the changes and close the file.

4. Run the following command to apply the changes:

/usr/local/psa/bin/php_settings -u

Read More



Cloudflare 502 error - Fix it Now ?


This article covers methods to resolve Cloudflare 502 error. Basically, the Cloudflare 502 error triggers when the origin web server responds with a standard HTTP 502 bad gateway or 504 gateway timeout error. 

This happens due to firewall restrictions and server resource issues.


Cause of 502 Bad Gateway Errors:

1. Domain name not resolvable

The domain name is not pointing to the correct IP or it does not point to any IP this problem may happen. Also, DNS propagation could take some time to make changes in DNS setting. It may take 24 to 48 hours to make reflect which is dependent upon the TTL defined per record on the DNS.

2. server down

The origin server is not reachable, this may due to the server is down for some reason or there is no communication to the server given.

3. Firewall blocks

A firewall interrupts the communication between the edge servers and the origin server. This may be caused by security plugins of your CMS.

As a part of DDOS protection and mitigation process or due to some strict firewall rules servers can be blocked from accessing the original server.

Read More



Nginx upstream timed out error - Fix it Now ?


This article covers methods to resolve Nginx upstream timed out error. Basically, this error happens as a result of server resource usage and software timeouts.

A possible issue here could be that PHP is using too much RAM and the PHP FPM process gets killed. 


Therefore, do the following to fix this nginx error:

1. Make sure that there is enough RAM on the server, to check that you could use the top, htop or free -m commands.

2. Make sure that the PHP memory limit is not too high compared to the actual available memory on the Droplet. 

For example if you have 1GB of RAM available your PHP memory limit should not be more than 64MB otherwise only a few processes could consume all of your memory.

3. Optimize your website by installing a good caching plugin, that way you would reduce the overall resource usage on the server.

4. Delete any plugins that are not being used. Generally speaking, it is always recommended to try and keep the number of your plugins as low as possible.

5. Consider using a CDN like Cloudflare, that way it would offload some of the heavy liftings from your Droplet. 

Read More



Vestacp 502 bad gateway error


This article will guide you on common causes for #Vestacp #502 bad gateway #error and different methods to fix this error.

A 502 Bad Gateway indicates that the edge server (server acting as a proxy) was not able to get a valid or any response from the origin server (also called upstream server).

Server software timeouts: This error can also occur when a web server takes more time to complete and a caching tool reaches its timeout values that time. Slow queries can also cause this problem too.'

To fix Error 502 Gateway:

1. Refresh the page.

2. Start a new browser session or load the site on a different browser.

3. Restart your computer and networking equipment.

4. Clear your #cache and cookies.

5. Change your #DNS server.

Read More



Steps to convert htaccess to NGINX


This tutorial will guide you on how to convert htaccess to nginx directives by keeping the directives within the server block while converting the .htaccess rewrite rules to NGINX rewrite directives.


Read More



Method to fix Cloudflare error 527


When a #connection is interrupted between Cloudflare data center and an origin #Railgun server(rg-listener), thus a #Cloudflare error 527 will occur. This is influenced by loss of #packet data or a #firewall restriction in this situation.

Read More




For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com






Focus on your business, not your servers.

Click Here to Learn More