{"id":1284,"date":"2020-07-15T10:40:32","date_gmt":"2020-07-15T10:40:32","guid":{"rendered":"http:\/\/ubiq.co\/tech-blog\/?p=1284"},"modified":"2025-09-12T04:35:44","modified_gmt":"2025-09-12T04:35:44","slug":"fix-504-gateway-timeout-error-nginx","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/","title":{"rendered":"How to Fix 504 Gateway Timeout Error in NGINX"},"content":{"rendered":"<p>Users get 504 Gateway Timeout Error in NGINX when you use it as a reverse proxy server and it gets timed out waiting for a response from back end web servers. Here&#8217;s how to fix 504 Gateway Timeout error in NGINX.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#What_is_504_Gateway_Timeout_Error_in_NGINX\" >What is 504 Gateway Timeout Error in NGINX<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#How_to_Fix_504_Gateway_Timeout_Error_in_NGINX\" >How to Fix 504 Gateway Timeout Error in NGINX<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#1_Server_goes_down\" >1. Server goes down<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#2_DNS_issue\" >2. DNS issue<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#3_Disable_CDN\" >3. Disable CDN<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#4_Network_Connectivity\" >4. Network Connectivity<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#5_Firewall_Issues\" >5. Firewall Issues<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#6_Spams_Bots_and_DDOS_attack\" >6. Spams, Bots and DDOS attack<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#7_Bugs_and_Faulty_Plugins\" >7. Bugs and Faulty Plugins<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_is_504_Gateway_Timeout_Error_in_NGINX\"><\/span>What is 504 Gateway Timeout Error in NGINX<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When you use NGINX as reverse proxy server and it times out waiting for a response from back end web servers, it sends a 504 Gateway Timeout error to client browser. This can happen due to various reasons such as application bugs, faulty plugins, poorly configured modules. Sometimes, it may be due to network issues and may get fixed automatically.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Fix_504_Gateway_Timeout_Error_in_NGINX\"><\/span>How to Fix 504 Gateway Timeout Error in NGINX<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Here are some of the key ways to fix 504 Gateway Timeout Error in NGINX.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"1_Server_goes_down\"><\/span>1. Server goes down<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>One of the most common causes for 504 bad gateway is that your back end server has gone down because it got overloaded with too many requests, or some long running requests. Such issues get fixed automatically when server\u00a0 load gets balanced. However, analyze server logs to identify the requested URLs just before your server went down, to optimize their code. Sometimes, it may also be a signal that you need to upgrade your server.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"2_DNS_issue\"><\/span>2. DNS issue<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>DNS issue can be on client side or server side. In case of server side DNS problems, the issue may be because your domain name doesn&#8217;t resolve to an IP, in case you have changed your website IP address or migrated your website to a new IP. In such cases, it may take anywhere between 5 minutes to 24 hours for the DNS records to be updated.<\/p>\n<p>In case of client-side problems, try flushing local DNS cache.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"3_Disable_CDN\"><\/span>3. Disable CDN<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If your website uses CDN, it may sometimes timeout causing NGINX to return 504 Gateway Timeout error. In such cases, just disable your CDN and try accessing your website.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"4_Network_Connectivity\"><\/span>4. Network Connectivity<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>NGINX will also give 504 Gateway Timeout error if there are network connectivity issues between your reverse proxy server and back end web server. Log into your proxy server and try connecting to your web server using curl\/ping command.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"5_Firewall_Issues\"><\/span>5. Firewall Issues<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If your web server&#8217;s firewall is not properly configured it may block many requests causing NGINX to give 504 Gateway Timeout error.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"6_Spams_Bots_and_DDOS_attack\"><\/span>6. Spams, Bots and DDOS attack<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Sometimes malicious attackers may flood your web server with too many requests, or slow running requests. Monitor your server log to see if there is any spike in traffic, identify their IP address ranges and put measures in place to regulate their incoming requests.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"7_Bugs_and_Faulty_Plugins\"><\/span>7. Bugs and Faulty Plugins<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Sometimes application bugs, faulty plugins and poorly configured modules can also slow down or bring down your server, causing NGINX to return 504 Gateway Timeout error. In this case too, you need to analyze server logs to find out which requested URLs are causing the issue and fix them soon.<\/p>\n<p>Hopefully, the above tips will help you fix 504 Gateway Timeout Error in NGINX. Alternatively, you can also <a href=\"https:\/\/ubiq.co\/tech-blog\/increase-request-timeout-nginx\/\">increase request timeout in NGINX<\/a>.<\/p>\n<p><a href=\"http:\/\/ubiq.co\/\">Ubiq<\/a>\u00a0makes it easy to visualize data in minutes, and monitor in real-time dashboards.\u00a0<a href=\"http:\/\/ubiq.co\/accounts\/register\">Try it<\/a>\u00a0Today!<\/p>\n<p>Also read:<br \/>\n<a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-whitelist-ip-in-nginx\/\">How to Whitelist IP in NGINX<\/a><br \/>\n<a href=\"https:\/\/ubiq.co\/tech-blog\/block-ip-address-nginx\/\">How to Block IP Address in NGINX<\/a><br \/>\n<a href=\"https:\/\/ubiq.co\/tech-blog\/fix-500-internal-server-error-nginx\/\">How to Fix 500 Internal Server Error in NGINX<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You get 504 Gateway Timeout error when NGINX proxy server times out while waiting for response from web server. Here&#8217;s how to fix 504 Gateway Timeout Error in NGINX.<\/p>\n","protected":false},"author":1,"featured_media":1290,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[103],"class_list":["post-1284","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nginx","tag-504-gateway-timeout"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Fix 504 Gateway Timeout Error in NGINX - Ubiq BI<\/title>\n<meta name=\"description\" content=\"You get 504 Gateway Timeout error when NGINX proxy server times out while waiting for response from web server. Here&#039;s how to fix 504 Gateway Timeout Error in NGINX.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Fix 504 Gateway Timeout Error in NGINX - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"You get 504 Gateway Timeout error when NGINX proxy server times out while waiting for response from web server. Here&#039;s how to fix 504 Gateway Timeout Error in NGINX.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-15T10:40:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-12T04:35:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/07\/fix-504-gateway-timeout-error-nginx.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/fix-504-gateway-timeout-error-nginx\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/fix-504-gateway-timeout-error-nginx\\\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to Fix 504 Gateway Timeout Error in NGINX\",\"datePublished\":\"2020-07-15T10:40:32+00:00\",\"dateModified\":\"2025-09-12T04:35:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/fix-504-gateway-timeout-error-nginx\\\/\"},\"wordCount\":547,\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/fix-504-gateway-timeout-error-nginx\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/fix-504-gateway-timeout-error-nginx.png?fit=1024%2C512&ssl=1\",\"keywords\":[\"504 gateway timeout\"],\"articleSection\":[\"Nginx\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/fix-504-gateway-timeout-error-nginx\\\/\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/fix-504-gateway-timeout-error-nginx\\\/\",\"name\":\"How to Fix 504 Gateway Timeout Error in NGINX - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/fix-504-gateway-timeout-error-nginx\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/fix-504-gateway-timeout-error-nginx\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/fix-504-gateway-timeout-error-nginx.png?fit=1024%2C512&ssl=1\",\"datePublished\":\"2020-07-15T10:40:32+00:00\",\"dateModified\":\"2025-09-12T04:35:44+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"You get 504 Gateway Timeout error when NGINX proxy server times out while waiting for response from web server. Here's how to fix 504 Gateway Timeout Error in NGINX.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/fix-504-gateway-timeout-error-nginx\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/fix-504-gateway-timeout-error-nginx\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/fix-504-gateway-timeout-error-nginx\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/fix-504-gateway-timeout-error-nginx.png?fit=1024%2C512&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/fix-504-gateway-timeout-error-nginx.png?fit=1024%2C512&ssl=1\",\"width\":1024,\"height\":512,\"caption\":\"fix 504 gateway timeout error in nginx\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/fix-504-gateway-timeout-error-nginx\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Fix 504 Gateway Timeout Error in NGINX\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sreeram-sreenivasan\\\/\"],\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/author\\\/wordpress\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Fix 504 Gateway Timeout Error in NGINX - Ubiq BI","description":"You get 504 Gateway Timeout error when NGINX proxy server times out while waiting for response from web server. Here's how to fix 504 Gateway Timeout Error in NGINX.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/","og_locale":"en_US","og_type":"article","og_title":"How to Fix 504 Gateway Timeout Error in NGINX - Ubiq BI","og_description":"You get 504 Gateway Timeout error when NGINX proxy server times out while waiting for response from web server. Here's how to fix 504 Gateway Timeout Error in NGINX.","og_url":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2020-07-15T10:40:32+00:00","article_modified_time":"2025-09-12T04:35:44+00:00","og_image":[{"width":1024,"height":512,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/07\/fix-504-gateway-timeout-error-nginx.png","type":"image\/png"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to Fix 504 Gateway Timeout Error in NGINX","datePublished":"2020-07-15T10:40:32+00:00","dateModified":"2025-09-12T04:35:44+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/"},"wordCount":547,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/07\/fix-504-gateway-timeout-error-nginx.png?fit=1024%2C512&ssl=1","keywords":["504 gateway timeout"],"articleSection":["Nginx"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/","url":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/","name":"How to Fix 504 Gateway Timeout Error in NGINX - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/07\/fix-504-gateway-timeout-error-nginx.png?fit=1024%2C512&ssl=1","datePublished":"2020-07-15T10:40:32+00:00","dateModified":"2025-09-12T04:35:44+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"You get 504 Gateway Timeout error when NGINX proxy server times out while waiting for response from web server. Here's how to fix 504 Gateway Timeout Error in NGINX.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/07\/fix-504-gateway-timeout-error-nginx.png?fit=1024%2C512&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/07\/fix-504-gateway-timeout-error-nginx.png?fit=1024%2C512&ssl=1","width":1024,"height":512,"caption":"fix 504 gateway timeout error in nginx"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/fix-504-gateway-timeout-error-nginx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to Fix 504 Gateway Timeout Error in NGINX"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/07\/fix-504-gateway-timeout-error-nginx.png?fit=1024%2C512&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-kI","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/1284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=1284"}],"version-history":[{"count":11,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/1284\/revisions"}],"predecessor-version":[{"id":9484,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/1284\/revisions\/9484"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/1290"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=1284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=1284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=1284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}