503 Service Unavailable - Backend Server  |  Apigee Edge  |  Apigee Docs (2024)

You're viewing Apigee Edge documentation.
Go to the Apigee X documentation.
info

Videos

Watch the following video to learn more about solving 503 Service Unavailable Errors.

Video Description
503 Service Unavailable Error from Backend Server Learn about the following:
  • Introduction to 503 Service Unavailable Error in Apigee Edge
  • Troubleshooting and resolving a real-time 503 Service Unavailable from Backend Server

Symptom

The client application receives an HTTP response status 503 with the message Service Unavailable followingan API proxy call.

Error messages

You can see one of the following error messages:

HTTP/1.1 503 Service Unavailable
HTTP/1.1 503 Service Unavailable: Back-end server is at capacity

You might also see an error message like the following in the HTTP response:

The server is temporarily unable to service your request due tomaintenance downtime or capacity problems. Please try again later.

Note: The above response code and error message are only examples.In some cases, you may receive only the error response code without any error message.The format and the content of the error response code and the error message may vary depending onthe backend server implementation.

Causes

The HTTP status code 503 means that the server is currently unable to handle the incoming requests. Usually, this error occurs because the server is too busy or is temporarily down for maintenance.

Possible causes for the 503 Service Unavailable response are:

Cause Description Who can perform the troubleshooting steps
Overloaded Server The backend server is overloaded or beyond its capacity and cannot handle any new incoming client requests. Edge Public and Private Cloud users
Server under maintenance The backend server may be under maintenance temporarily. Edge Public and Private Cloud users

Cause: Overloaded Server/Server under Maintenance

In Apigee Edge, the 503 Service Unavailable Error can be returned from a backend server under either of the following circ*mstances:

  • A backend server is overloaded/busy and cannot handle any new requests.
  • The backend server is down for a temporary period due to maintenance.

Diagnosis

To diagnose the error, you can use any of the following three methods:

  • Trace tool
  • NGINX access logs
  • Direct call to backend server

Click the tabs below to learn about each method.

Trace tool

  1. Enable the trace session, and make the API call to reproduce the issue - 503 Service Unavailable.
  2. Select one of the failing requests and examine the trace.
  3. Navigate through various phases of the trace and locate where the failure occurred.
  4. If you find that the 503 error is returned as a response from the target server, the cause for 503 error is the target server.

    Here’s a sample trace screenshot showing 503 Service Unavailable response received from the target server:

    503 Service Unavailable - Backend Server | Apigee Edge | Apigee Docs (1)
  5. Click the Response received from target server phase and go through the Response Headers and Response Content sections to see if they have any useful information:
    • The Response Headers may contain the Server header, which indicates where the error response was sent from.
    • The Response Content may contain additional information about why the target server sent the 503 response code.
    503 Service Unavailable - Backend Server | Apigee Edge | Apigee Docs (2)
  6. Confirm that the 503 error is coming from the target server by checking the values of X-Apigee-fault-source and X-Apigee-fault-code in the AX (Analytics Data Recorded) Phase in the trace using the steps given below:
    1. Click on AX (Analytics Data Recorded) Phase as shown in the screenshot below: 503 Service Unavailable - Backend Server | Apigee Edge | Apigee Docs (3)
    2. Scroll down the Phase Details to the Response Headers section and determine the values of X-Apigee-fault-code and X-Apigee-fault-source as shown below: 503 Service Unavailable - Backend Server | Apigee Edge | Apigee Docs (4)
    3. If the values of X-Apigee-fault-source and X-Apigee-fault-code match the values shown in the below table, you can confirm that the 503 error is coming from the target server:
      Response Headers Value
      X-Apigee-fault-source target
      X-Apigee-fault-code messaging.adaptors.http.flow.ErrorResponseCode
  7. Check if you are using proxy chaining i.e. if the target server/target endpoint is invoking another proxy in Apigee. To determine this:
    1. Navigate back to the Request sent to target server phase and click the Show Curl button and determine the target server host alias.
    2. If the target server host alias is pointing to a virtual host alias, then it's proxy chaining. In this case, you need to repeat all the above steps for the chained proxy till you determine what is actually causing the 503 Service Unavailable error. In these cases 503 Service Unavailable may happen in other chained proxies at other stages as well which can be diagnosed using this playbook.
    3. If the target server host alias points to your backend server, then go to Resolution.

NGINX access logs

You can also refer to NGINX lccess logs to determine whether the 503 status code was sent by the backend server. This is particularly useful if the issue has occurred in the past or if the issue is intermittent and you are unable to capture the trace in UI. Use the following steps to determine this information from NGINX access logs:

  1. Check the NGINX access logs.
    /opt/apigee/var/log/edge-router/nginx/<org>~<env>.<port#>_access_log
  2. Search for any 503 Errors for the specific API proxy during a specific duration (if the problem happened in the past) or for any requests still failing with 503.
  3. If there are any 503 Errors, then check if the error is coming from the backend server. If the values of X-Apigee-fault-source and X-Apigee-fault-code match the values shown in the table below, the 503 error is coming from the backend server:
    Response Headers Value
    X-Apigee-fault-source target
    X-Apigee-fault-code messaging.adaptors.http.flow.ErrorResponseCode

    Here's a sample entry showing the 503 error caused by the target server:

    503 Service Unavailable - Backend Server | Apigee Edge | Apigee Docs (5)
  4. Review the specific API Proxy and ensure that you are using proxy chaining i.e., if the target server/target endpoint is not invoking another proxy in Apigee. If you are using proxy chaining, you need to repeat all the above steps for the chained proxy until you determine what is actually causing the 503 Service Unavailable error. In these cases, 503 Service Unavailable may happen in other chained proxies at other stages as well, which you can diagnose using this playbook.
  5. If you confirm that you are not using proxy chaining, and the 503 error is coming from your backend server, then go to Resolution.

Call to Backend Server

You can make a direct call to the backend server and verify that you are getting the same 503 Service Unavailable response as received when the request was made through Apigee Edge.

  1. Ensure that you have all the required headers, query parameters and any credentials that need to be passed to the backend server as part of the request.
  2. If the backend service is publicly accessible, you can use the curl command, Postman or any other REST Client and invoke the backend server API directly.
  3. If the backend server is accessible only from the Message Processors, you can use the curl command, Postman or any other REST Client and invoke the backend server API directly from the Message Processor.
  4. Verify that the backend service is indeed returning 503 Service Unavailable error.

Resolution

If you ascertain that the 503 error is coming from the backend server, you can do thefollowing to resolve the issue:

  • If the issue is caused because the backend server is down for maintenance, you can bring the backend server online after the maintenance period.
  • If the issue is caused because the backend server is overloaded, then fix the issue if you have access to the backend server. Otherwise you may need to work with your backend server team to fix the issue.

Diagnose Issues using API Monitoring

API Monitoring enables you to isolateproblem areas quickly to diagnose error, performance,and latency issues and their source, such as developer apps, API proxies, backend targets,or the API platform.

Step through a samplescenario that demonstrates how to troubleshoot 5xx issues with your APIsusing API Monitoring. For example, you may want to set up an alert to be notified when the numberof messaging.adaptors.http.flow.ErrorResponseCode faults exceeds a particular threshold.

Must gather diagnostic information

If the problem persists even after following the above instructions, please gather thefollowing diagnostic information, and then contactApigee Support.

If you are a public cloud user, provide the following information:

  • Organization Name
  • Environment Name
  • API Proxy Name
  • Complete curl command to reproduce the 503 error
  • Trace file containing the requests with 503 Service Unavailable error
  • If the 503 errors are not occurring currently, provide the time period with the timezone information when 503 errors occurred in the past.

If you are a private cloud user, provide the following information:

  • Complete error message observed for the failing requests.
  • Organization, Environment Name and API Proxy Name for which you are observing 503 errors.
  • API Proxy Bundle.
  • Trace file containing the requests with 503 Service Unavailable error.
  • NGINX access logs.
    /opt/apigee/var/log/edge-router/nginx/<org>~<env>.<port#>_access_log
  • Message Processor logs.
    /opt/apigee/var/log/edge-message-processor/logs/system.log
  • The time period with the timezone information when the 503 errors occurred.
503 Service Unavailable - Backend Server  |  Apigee Edge  |  Apigee Docs (2024)

FAQs

What is 503 error in Microsoft edge? ›

503 Service Unavailable server error response code indicates that the server is not ready to handle the request.

How do I fix service unavailable error 503? ›

How to Resolve the 503 Error
  1. Check Resource Usage. The resources that a server uses are RAM, CPU, I/O, entry processes, and website inodes. ...
  2. Check for Ongoing Maintenance. ...
  3. Stop Running Processes. ...
  4. Reset Firewall. ...
  5. Check Server Logs and Fix the Code. ...
  6. Restart Your Server and Networking Equipment. ...
  7. Check Your DNS.

How to bypass 503 service temporarily unavailable? ›

How to Fix the 503 Service Unavailable Error
  1. Reboot your server.
  2. Check for server maintenance.
  3. Temporarily stop running processes.
  4. Temporarily disable your plugins and website theme.
  5. Temporarily disable your CD.
  6. Check your DNS.
  7. Increase your server's resources.

What does it mean when the server responded with a status of 503 Service Unavailable? ›

The HTTP status code 503 means that the server is currently unable to handle the incoming requests. Usually, this error occurs because the server is too busy or is temporarily down for maintenance. The backend server is overloaded or beyond its capacity and cannot handle any new incoming client requests.

Will Error 503 fix itself? ›

Check for Ongoing Maintenance Or Upgrade Running. If your server is showing an HTTP 503 error, then it is possible that the server is being updated in the background. If this disruption is caused by an automatic update, then it usually resolves itself within a couple of minutes.

What is the root cause of error 503? ›

If files on the web server are unable to connect to those on the database server, a 503 error is likely. This can happen when the credentials from the config file are incorrect — or because the hostname isn't working at the moment. The database could even be corrupted, perhaps due to a faulty plugin.

What is Microsoft 503 Service Temporarily Unavailable? ›

If you're trying to sign in to Microsoft To Do on the web and see a 503 error, this could be related to limitations in the local network or restrictions on a corporate network. Check with your IT admin to make sure none of these URLs are blocked: .

What is 503 Service Unavailable no server is available to handle? ›

Error 503 (Service Temporarily Unavailable) means that the resource limits of your hosting plan are being reached The most common reasons are a poorly optimized website, or if your has outgrown your current plan.

What is 503 Service Unavailable from? ›

The "503" error typically indicates the service might be overloaded or unavailable momentarily. These issues usually resolve on their own, but it's understandable that you'd want to find a more permanent solution.

How long does 503 Service Unavailable last? ›

In most cases, the 503 service unavailable error will disappear as soon as the traffic goes down. Hence, allowing visitors to view your content after a little while. However, when the error persists for an extended period, it might be an indication of a more serious problem within your server.

What resulted in a 503 Service Unavailable? ›

The HTTP 503 Service Unavailable error means that a website can't be reached at the moment because the server is not ready to handle the request. This could happen because it's too busy, under maintenance, or something else which requires a deeper analysis.

Why is my application shutting down 503? ›

The primary reason for this error is a stopped or disabled application pool. The application pool is the IIS component that initiates a worker process, which then allows the web server to process incoming requests for a website. When something is wrong with the application pool, the web server throws an HTTP Error 503.

How do I avoid error 503? ›

How Can I Prevent 503 Service Unavailable Errors? Regularly monitor server resources, such as CPU usage and memory, and optimize website performance by minimizing HTTP requests, compressing files, and caching content. Consider upgrading to a higher-tier hosting plan if website traffic or resource usage is high.

How do I reset my Microsoft Edge browser? ›

Open Edge: Click on the icon or find it in the Start menu. Get to Settings: Click the three horizontal dots in the upper right corner. Select “Settings”. Reset Edge: Scroll down until you see “Reset settings” under “Clear browsing data.” Click it, then select “Reset”.

What is the cause of 503 Bad Gateway? ›

In the majority of cases, an HTTP error 503 happens when a website cannot connect with its supported server as a result of a maintenance fault or other technical issue. Unlike HTTP error 400, it's unlikely to stem from a client-side issue such as a mistake in a URL.

How to clear cache in Microsoft Edge? ›

To clear your browser cache and cookies in Microsoft Edge, go to Settings > Privacy > Clear browsing data and select Ctrl+Shift+Del. You can also type "edge://settings/clearbrowserdata" in your address bar to access this function. Clear your browsing history, cookies, and cached images and files in minutes.

Top Articles
Latest Posts
Article information

Author: Nicola Considine CPA

Last Updated:

Views: 6516

Rating: 4.9 / 5 (49 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Nicola Considine CPA

Birthday: 1993-02-26

Address: 3809 Clinton Inlet, East Aleisha, UT 46318-2392

Phone: +2681424145499

Job: Government Technician

Hobby: Calligraphy, Lego building, Worldbuilding, Shooting, Bird watching, Shopping, Cooking

Introduction: My name is Nicola Considine CPA, I am a determined, witty, powerful, brainy, open, smiling, proud person who loves writing and wants to share my knowledge and understanding with you.