I’ve been receiving this error message Gateway Timeout. The Gateway did not receive a timely response from the upstream server or application on several WordPress websites and I decided to figure out how to fix this and found a solution. This is the typical error message I would get:

The Simple Entrepreneur Gateway Timeout Issue Message

When I tried to update a plugin I would also get this error:

The Simlpe Entrepreneur Gateway Timeout Issue Fix Plugins

Let me quickly explain my WordPress setup. I am using various VPS server hosting providers (Azure, AWS, Online Hosting Solutions) with Ubuntu 22.04.3 LTS and HestiaCP as the control panel. Some of the VPS servers have multiple domains hosted and HestiaCP is a great tool for managing this. I previously used VestaCP but this is no longer supported hence the reason for using HestiaCP. HestiaCP uses apache and nginx as the web platform. The setup is pretty straight forward but there is a setting on apache that causes the Timeout issue. There are a few options to fix this problem and you can either use SSH or HestiaCP to fix it.

SSH

Login to the VPS server via SSH

Edit the apache2 configuration file:

vi /etc/apache2/apache2.conf
The Simple Entrepreneur Gateway Timeout SSH edit apache2

Change the Timeout from 30 to 60 or higher. If there is a script or application that is running for more than 30 seconds it will time out and cause the error message. Now a script shouldn’t take more than 30 seconds but if you’re running a heavy website or if you have WordPress plugins that cause a delay you may need to increase this.

You will then need to restart apache so type:

service apache2 restart
The Simple Entrepreneur Gateway Timeout SSH edit apache2 service apache2 restart

HESTIACP

You can also change this setting via the HestiaCP dashboard. Here are the steps:

Click on Server Settings

The Simple Entrepreneur Gateway Timeout HestiaCP Server Setting

Click on the edit Apache2

The Simple Entrepreneur Gateway Timeout HestiaCP Server Setting Apache2 edit

At the bottom change the timeout from the default 30 to 60 or higher

The Simple Entrepreneur Gateway Timeout HestiaCP Server Setting Apache2 edit timeout setting

OTHER TIMEOUT SETTINGS

If the above options didn’t work then you may need to also play around with other time related settings.

There are other additional timeout settings in both apache2 and nginx you need to test.

Edit the apache2 service and then click on Configure PHP

The Simple Entrepreneur Gateway Timeout HestiaCP Server Setting Apache2 configure PHP

Increase the max_execution_time and the max_input_time

The Simple Entrepreneur Gateway Timeout HestiaCP Server Setting Apache2 configure PHP execution input time

If the above also didn’t fix the issue there are also timeout settings in nginx so edit the nginx service

The Simple Entrepreneur Gateway Timeout HestiaCP Server Setting nginx edit

Increase the different timeout settings one by one and see if it makes a difference

The Simple Entrepreneur Gateway Timeout HestiaCP Server Setting nginx timeout settings

The last resort would be to migrate your WordPress instance to another hosting provider as it’s possible the server could be too slow and causing the issue.

Here’s a video showing you the steps in more detail. Make sure to like the video and subscribe to the channel.

I hope this helped and if it did please share the article and subscribe to my newsletter.

Subscribe to my newsletter where I will share my journey in affiliate marketing, business, technology, fitness and life in general. Hopefully, this motivates you to also change your journey in life.

This field is required.

Subscribe to my newsletter where I will share my journey in affiliate marketing, business, technology, fitness and life in general. Hopefully, this motivates you to also change your journey in life.

This field is required.

If this article helped you in any way and you want to show your appreciation, I am more than happy to receive donations through PayPal. This will help me maintain and improve this website so I can help more people out there. Thank you for your help.

HELP OTHERS AND SHARE THIS ARTICLE


1Shares

LEAVE A COMMENT