502 Error - sudden

@Mohit_Madan configuration under following files required.

cat /etc/nginx/sites-available/connectjaipur.com cat /etc/nginx/sites-available/thetechportal.com

also provide output of service php5.6-fpm status service php7.0-fpm status

Sorry my bad. Here’s the requested information:

root@server3:~# cat /etc/nginx/sites-available/connectjaipur.com

server {

server_name connectjaipur.com   www.connectjaipur.com;


access_log /var/log/nginx/connectjaipur.com.access.log rt_cache; 
error_log /var/log/nginx/connectjaipur.com.error.log;


root /var/www/connectjaipur.com/htdocs;



index index.php index.html index.htm;


include common/php.conf;      
include common/wpcommon.conf;
include common/locations.conf;
include /var/www/connectjaipur.com/conf/nginx/*.conf;

} root@server3:~# cat /etc/nginx/sites-available/thetechportal.com

server {

server_name thetechportal.com   www.thetechportal.com;


access_log /var/log/nginx/thetechportal.com.access.log rt_cache; 
error_log /var/log/nginx/thetechportal.com.error.log;


root /var/www/thetechportal.com/htdocs;



index index.php index.html index.htm;


include common/php.conf;      
include common/wpcommon.conf;
include common/locations.conf;
include /var/www/thetechportal.com/conf/nginx/*.conf;

location ~ ^/(status|ping)$ { access_log off; allow 127.0.0.1; allow 47.30.61.93; deny all; include fastcgi_params; fastcgi_pass 127.0.0.1:9000; } } root@server3:~# root@server3:~# service php5.6-fpm status php5.6-fpm start/running, process 863 root@server3:~# service php7.0-fpm status php7.0-fpm: unrecognized service root@server3:~#

@Mohit_Madan Above mentioned sites seems to be resolving fine :slight_smile: . I hope the issue is resolved !

For better performance, consider updating to easyengine with php7.

If you have not altered any configuration set by easyengine & if you don’t have any custom nginx configuration, you can use the following command to change php version. ee site update sitename.com --php7

you can check on

Hey

Thanks for the prompt response. thetechportal.com is not working, I have to reboot the server several times and restart php5.6-fpm several times just to get it up for a couple of minutes.

Connectjaipur is working as I have migrated it to a different server.

Any help would be appreciated. :’(

I have tried updating the website to php7 but still getting the 502 error :frowning:

As I mentioned above, for tracking issues, always provide available logs,

tail -50 /var/log/nginx/thetechportal.com.error.log tail -50 /var/log/php/5.6/fpm.log

:frowning: since ee site update sitename.com --php7 failed, you can try changing php version manually.

(make sure you took backup of nginx configurations (under /etc/nginx) )

Also if above command face any issue, you can check on to following thread discussing similar issue.

tail -50 /var/log/nginx/thetechportal.com.error.log 2017/06/21 13:12:46 [error] 803#803: *1918 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.167.114, server: thetechportal.com, request: “GET /news/gaming/feed/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:47 [error] 803#803: *1920 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.166.71, server: thetechportal.com, request: “GET /2017/05/30/cryptocurrencies-legal-india/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://www.google.co.in/” 2017/06/21 13:12:47 [error] 803#803: *1922 connect() failed (111: Connection refused) while connecting to upstream, client: 108.162.246.5, server: thetechportal.com, request: “GET /2016/09/21/tesla-security-update-patch-bugs/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:47 [error] 803#803: *1924 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.179.28, server: thetechportal.com, request: “GET /wp-json/oembed/1.0/embed?url=https%3A%2F%2Fthetechportal.com%2F2016%2F11%2F04%2Fsenjo-group-global-hq-singapore%2F&format=xml HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:47 [error] 803#803: *1926 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.167.114, server: thetechportal.com, request: “GET /futurism/feed HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:47 [error] 803#803: *1928 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.91.197, server: thetechportal.com, request: “GET /2017/06/17/google-tensorflow-object-detection-api/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://www.google.co.il/” 2017/06/21 13:12:47 [error] 803#803: *1929 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.167.114, server: thetechportal.com, request: “GET /internet/feed/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:48 [error] 803#803: *1932 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.166.83, server: thetechportal.com, request: “GET /2016/04/15/oyo-rooms-reportedly-started-leasing-hotels-oyo-flagship-brand/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://www.google.co.in/search?q=difference+between+oyo+flagship+and+premium&ie=utf-8&oe=utf-8&gws_rd=cr&ei=j2JKWdS9CsbyvAS5jIPoCA” 2017/06/21 13:12:49 [error] 803#803: *1934 connect() failed (111: Connection refused) while connecting to upstream, client: 141.101.88.148, server: thetechportal.com, request: “GET / HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:49 [error] 803#803: *1936 connect() failed (111: Connection refused) while connecting to upstream, client: 188.114.110.100, server: thetechportal.com, request: “GET /wp-login.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:49 [error] 803#803: *1938 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.167.114, server: thetechportal.com, request: “GET /news/mobile-apps-news/feed/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:50 [error] 803#803: *1940 connect() failed (111: Connection refused) while connecting to upstream, client: 188.114.110.100, server: thetechportal.com, request: “GET / HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:50 [error] 803#803: *1942 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.167.114, server: thetechportal.com, request: “GET /tech-culture-news/feed/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:52 [error] 801#801: *1944 connect() failed (111: Connection refused) while connecting to upstream, client: 172.68.86.10, server: thetechportal.com, request: “GET /news/it-web-tech/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:55 [error] 801#801: *1946 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.166.71, server: thetechportal.com, request: “GET /2017/04/12/indian-govt-studies-crypto-currency/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://www.google.co.in/” 2017/06/21 13:12:55 [error] 801#801: *1948 connect() failed (111: Connection refused) while connecting to upstream, client: 108.162.246.5, server: thetechportal.com, request: “GET /tag/flipkart-ceo-email-hacked/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:56 [error] 801#801: *1950 connect() failed (111: Connection refused) while connecting to upstream, client: 141.101.105.90, server: thetechportal.com, request: “GET /2016/11/11/facebook-fake-news-allegations-crazy/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:57 [error] 805#805: *1952 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.90.234, server: thetechportal.com, request: “GET /author/jeet/page/80/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:57 [error] 805#805: *1954 connect() failed (111: Connection refused) while connecting to upstream, client: 172.68.253.71, server: thetechportal.com, request: “GET /wp-json/oembed/1.0/embed?url=https%3A%2F%2Fthetechportal.com%2F2017%2F04%2F15%2Fspacex-hyperloop-pod-competition-2%2F&format=xml HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:12:58 [error] 803#803: *1911 connect() failed (111: Connection refused) while connecting to upstream, client: 198.41.238.22, server: thetechportal.com, request: “GET /2017/06/20/apple-health-gorilla-medical-records-iphone-integration/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://thetechportal.com/2017/06/20/apple-health-gorilla-medical-records-iphone-integration/” 2017/06/21 13:12:58 [error] 805#805: *1957 connect() failed (111: Connection refused) while connecting to upstream, client: 172.68.144.79, server: thetechportal.com, request: “GET /2017/06/20/keypr-cloud-hotel-management-series-a1-funding/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:00 [error] 805#805: *1959 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.62.75, server: thetechportal.com, request: “GET /2017/06/21/infosys-former-head-us-immigration-files-lawsuit/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:01 [error] 805#805: *1961 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.166.71, server: thetechportal.com, request: “GET /2017/04/12/indian-govt-studies-crypto-currency/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://thetechportal.com/2017/04/12/indian-govt-studies-crypto-currency/” 2017/06/21 13:13:02 [error] 797#797: *1963 connect() failed (111: Connection refused) while connecting to upstream, client: 173.245.50.108, server: thetechportal.com, request: “GET /2016/03/21/godaddy-launches-cloud-servers-cloud-applications-serve-small-businesses/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://thetechportal.com/2016/03/21/godaddy-launches-cloud-servers-cloud-applications-serve-small-businesses/” 2017/06/21 13:13:02 [error] 797#797: *1964 connect() failed (111: Connection refused) while connecting to upstream, client: 173.245.50.108, server: thetechportal.com, request: “GET /2015/04/01/godaddy-raises-460m-in-its-public-trading-debut-shares-rises-up-by-over-30/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://thetechportal.com/2015/04/01/godaddy-raises-460m-in-its-public-trading-debut-shares-rises-up-by-over-30/” 2017/06/21 13:13:03 [error] 797#797: *1967 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.166.125, server: thetechportal.com, request: “GET /feed/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:05 [error] 797#797: *1969 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.62.75, server: thetechportal.com, request: “GET /2017/06/21/sony-launches-koov-robotics-kit-indiegogo/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:05 [error] 797#797: *1971 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.106.18, server: thetechportal.com, request: “GET /2017/06/21/tesla-rejigs-autopilot-software-team/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://thetechportal.com/2017/06/21/tesla-rejigs-autopilot-software-team/” 2017/06/21 13:13:06 [error] 797#797: *1973 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.154.133, server: thetechportal.com, request: “GET /2017/05/25/airbnb-teaching-data-science/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://www.google.co.uk/” 2017/06/21 13:13:08 [error] 797#797: *1975 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.179.154, server: thetechportal.com, request: “GET /?p=71351 HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:08 [error] 797#797: *1976 connect() failed (111: Connection refused) while connecting to upstream, client: 141.101.105.168, server: thetechportal.com, request: “GET /2016/12/02/apple-plans-distribution-center-india/?share=twitter HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:13 [error] 797#797: *1979 connect() failed (111: Connection refused) while connecting to upstream, client: 173.245.50.108, server: thetechportal.com, request: “GET /2016/06/09/bigrock-introduces-dedicated-linux-windows-servers-india/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://thetechportal.com/2016/06/09/bigrock-introduces-dedicated-linux-windows-servers-india/” 2017/06/21 13:13:17 [error] 797#797: *1981 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.167.114, server: thetechportal.com, request: “GET /news/gaming/feed/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:18 [error] 797#797: *1983 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.167.114, server: thetechportal.com, request: “GET /internet/feed/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:18 [error] 797#797: *1985 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.222.58, server: thetechportal.com, request: “GET /category/news/gaming/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:18 [error] 797#797: *1987 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.179.250, server: thetechportal.com, request: “GET /thetechportal.com/2015/11/11/udacity-raises-a-series-d-105-million-funding-valuation-turns-1-billion/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:18 [error] 797#797: *1988 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.167.114, server: thetechportal.com, request: “GET /futurism/feed HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:19 [error] 797#797: *1991 connect() failed (111: Connection refused) while connecting to upstream, client: 173.245.50.108, server: thetechportal.com, request: “GET /2016/12/06/godaddy-acquires-wp-curve/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://thetechportal.com/2016/12/06/godaddy-acquires-wp-curve/” 2017/06/21 13:13:20 [error] 797#797: *1993 connect() failed (111: Connection refused) while connecting to upstream, client: 108.162.246.5, server: thetechportal.com, request: “GET /tag/london-startup/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:20 [error] 797#797: *1995 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.167.114, server: thetechportal.com, request: “GET /news/mobile-apps-news/feed/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:20 [error] 797#797: *1997 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.167.114, server: thetechportal.com, request: “GET /tech-culture-news/feed/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:21 [error] 797#797: *1999 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.62.135, server: thetechportal.com, request: “GET /feed HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:22 [error] 797#797: *2001 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.106.24, server: thetechportal.com, request: “GET /2014/08/03/after-s5s-ignominious-failure-has-the-s-series-lost-its-charisma/amp/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:22 [error] 797#797: *2003 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.62.135, server: thetechportal.com, request: “GET /feed HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:22 [error] 797#797: *2005 connect() failed (111: Connection refused) while connecting to upstream, client: 172.68.143.150, server: thetechportal.com, request: “GET /category/news/business/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:23 [error] 797#797: *2007 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.62.135, server: thetechportal.com, request: “GET /feed HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:24 [error] 797#797: *2009 connect() failed (111: Connection refused) while connecting to upstream, client: 108.162.238.71, server: thetechportal.com, request: “GET /2016/08/02/women-job-sheroes-series-a-funding/?share=linkedin HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com” 2017/06/21 13:13:25 [error] 800#800: *2011 connect() failed (111: Connection refused) while connecting to upstream, client: 173.245.50.108, server: thetechportal.com, request: “GET /2016/11/15/google-restricting-adsense-fake-sites/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://thetechportal.com/2016/11/15/google-restricting-adsense-fake-sites/” 2017/06/21 13:13:25 [error] 800#800: *2013 connect() failed (111: Connection refused) while connecting to upstream, client: 172.68.142.5, server: thetechportal.com, request: “GET /news/mobile-apps-news/feed/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com”, referrer: “https://thetechportal.com/news/mobile-apps-news/feed/” 2017/06/21 13:13:25 [error] 800#800: *2015 connect() failed (111: Connection refused) while connecting to upstream, client: 162.158.146.52, server: thetechportal.com, request: “GET /tag/crm/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com

Nothing

Any tips? Anyone? :frowning:

@Mohit_Madan

Currently nginx is trying to connect to php7 (127.0.0.1:9070). So check php7-fpm is running on that port using netstat -ntualp |grep :9070

If not start the php7-fpm using service php7.0-fpm start

and check again and confirm whether the php-fpm is running on port 9070.

and make sure your nginx configuration is having the configuration similar to below configuration. ( specifying php7 configuration )

`server {

server_name thetechportal.com www.thetechportal.com;

access_log /var/log/nginx/thetechportal.com.access.log rt_cache; error_log /var/log/nginx/thetechportal.com.error.log;

root /var/www/thetechportal.com/htdocs;

index index.php index.html index.htm;

include common/php7.conf;

include common/wpcommon-php7.conf; include common/locations-php7.conf; include /var/www/thetechportal.com/conf/nginx/*.conf; }`

and check nginx configuration and restart. nginx -t && service nginx restart

This is returning me no result. I have tried service php7.0-fpm start

but it says service is already running.

The configurations are same as you mentioned.

if so, comment out any existing “listen” directive in /etc/php/7.0/fpm/pool.d/www.conf

and add the following line.

listen = 127.0.0.1:9070 and restart php7-fpm using service php7.0-fpm restart

Made the changes, here’s the output now:

netstat -ntualp |grep :9000 root@server3:~# netstat -ntualp |grep :9070 tcp 0 1 43.228.237.43:34479 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34435 127.0.0.1:9070 SYN_SENT 702/nginx: worker p tcp 0 1 43.228.237.43:34460 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34449 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34455 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34477 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34484 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34457 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34470 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34469 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34450 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34467 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34480 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34440 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34485 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34473 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34471 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34476 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34474 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34442 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34478 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34445 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34468 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34443 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34441 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34452 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34444 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34463 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34475 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34454 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34472 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34465 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34482 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34438 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34481 127.0.0.1:9070 SYN_SENT 703/nginx: worker p tcp 0 1 43.228.237.43:34483 127.0.0.1:9070 SYN_SENT 703/nginx: worker p

Getting 504 now :frowning:

Shouldn’t it be 127.0.0.1 instead of the server ip 43.228.237.43?

Here’s the error in the log file:

2017/06/21 19:18:00 [error] 698#698: *1680 upstream timed out (110: Connection timed out) while connecting to upstream, client: 162.158.122.90, server: thetechportal.com, request: “GET /news/page/3/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “thetechportal.com

try changing following parameters in /etc/php/7.0/fpm/php.ini

request_terminate_timeout = 300 max_execution_time = 300

and make sure, /etc/nginx/nginx.conf have fastcgi_read_timeout 300;

also add listen 127.0.0.1:80 under "server { " block of /etc/nginx/sites-available/sitename` and restart nginx and php7-fpm.

@antopjoseph

I did as directed above, but now not listening anything on 9070 and php7.0-fpm stops automatically:

root@server3:~# service nginx restart && service php7.0-fpm restart nginx stop/waiting nginx start/running, process 4253 stop: Unknown instance: php7.0-fpm start/running, process 4276

root@server3:~# service php7.0-fpm status php7.0-fpm stop/waiting root@server3:~# service php7.0-fpm start php7.0-fpm start/running, process 4483 root@server3:~# netstat -ntualp |grep :9070

Here’s what the config file looks like:

server

{

server_name thetechportal.com   www.thetechportal.com;


access_log /var/log/nginx/thetechportal.com.access.log rt_cache;
error_log /var/log/nginx/thetechportal.com.error.log;


root /var/www/thetechportal.com/htdocs;



index index.php index.html index.htm;


include common/php7.conf;  

include common/wpcommon-php7.conf;
include common/locations-php7.conf;
include /var/www/thetechportal.com/conf/nginx/*.conf;

listen 127.0.0.1:80; }

BTW, earlier :22222 was working but now that is giving 504 error as help. Please help! :frowning:

You’re not gonna believe this, but getting default nginx page when trying to open thetechportal.com :o

@Mohit_Madan You can verify/recheck the document root specified in nginx configuration is right. Also put a sample text file and php file with phpinfo(); under document root and try calling them from browser.

Also I could see that you are using cloudflare, please specify you server IP & domain name in hosts file of you machine and test :neutral_face:

thetechportal.com/textfile.txt thetechportal.com/info.php

and if this is giving 404, check tail -f /var/log/nginx/thetechportal.com.error.log for finding the root cause.