Condtional Timeout Configuration on Centos7 to avoid Gateway Timeout Error

64 views Asked by At

I am encountering a gateway timeout issue on my CentOS 7 server while trying to make a specific API call on one of my websites. The API call takes more than 2 minutes to respond, and the default timeout value in the httpd.conf file is set to 60 seconds. However, I'd like to adjust the timeout value only for this particular API call to 150 seconds without affecting the other websites hosted on the server.

Here's a brief overview of my setup:

  • CentOS 7 server
  • Drupal6
  • The problematic API call is located at http://example.com/api/slow-call
  • The current timeout in httpd.conf is set to Timeout 60

Could someone kindly guide me through the steps to achieve this? I want to ensure that the extended timeout only applies to the specific API call and doesn't impact the other websites' performance or global timeout settings.

I've researched the option of modifying the global timeout in httpd.conf, but I'd like to explore a solution that allows for targeted adjustment without affecting other websites. Additionally, is this even a good practice to update the Timeout conditionally or I should go with altering it globally.

0

There are 0 answers