Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-28, 02:45:11

Author Topic: site get erorr 502 bad gateway nginx  (Read 3405 times)

0 Members and 1 Guest are viewing this topic.

Offline cmdman

  • Senior Member
  • *
  • Posts: 298
  • Karma: +1/-0
    • View Profile
site get erorr 502 bad gateway nginx
« on: 2015-04-07, 17:54:48 »
hi mr.

i formated and resintalled and restore from backup because of sql error now all works fine ..

problem is online users on forum is Online now: 988 (Members: 686, Guests: 302) and ever 3 to 4mints i get  502 bad gateway nginx and when i restart all services like restart-all site open and then after 3 to 4 mints again bad gateway error

how to optimise this issues

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: site get erorr 502 bad gateway nginx
« Reply #1 on: 2015-04-07, 18:10:48 »
Change owner for website to other then admin. And then increasing 'fastcgi chidrens' to 12 or more (depend on your memory; 'unlimited' mean 6 children) in 'Limit'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline cmdman

  • Senior Member
  • *
  • Posts: 298
  • Karma: +1/-0
    • View Profile
Re: site get erorr 502 bad gateway nginx
« Reply #2 on: 2015-04-07, 18:18:54 »
my server 16GB ram dedicated server with 250GB ssd drive its good hardware , but my forum developer said not to use fastcgi use only cgi or apache module

Offline cmdman

  • Senior Member
  • *
  • Posts: 298
  • Karma: +1/-0
    • View Profile
Re: site get erorr 502 bad gateway nginx
« Reply #3 on: 2015-04-07, 18:23:44 »
iam geting some php errors

2015/04/07 18:22:44 [warn] 5916#0: *161586 using uninitialized "user" variable, client: 124.287.140.183, server: _, request: "GET / HTTP/1.1", host: "62.210.222.138"
2015/04/07 18:22:44 [crit] 5916#0: *161586 connect() to unix:/home/php-fpm/sock/.sock failed (2: No such file or directory) while connecting to upstream, client: 104.217.680.13, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/home/php-fpm/sock/.sock:", host: "52.610.822.538"

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: site get erorr 502 bad gateway nginx
« Reply #4 on: 2015-04-07, 18:24:49 »
No reason not to use fastcgi. It's faster php processing. if you have big RAM, try 'fastcgi children' until 60 or more.

Beside, better install opcache or apc or xcache. My recommendation is opcache and you can run 'yum install php54-pecl-zendopcache' (for php54 branch). And then 'sh /script/restart-web -y'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: site get erorr 502 bad gateway nginx
« Reply #5 on: 2015-04-07, 18:26:28 »
iam geting some php errors

2015/04/07 18:22:44 [warn] 5916#0: *161586 using uninitialized "user" variable, client: 124.287.140.183, server: _, request: "GET / HTTP/1.1", host: "62.210.222.138"
2015/04/07 18:22:44 [crit] 5916#0: *161586 connect() to unix:/home/php-fpm/sock/.sock failed (2: No such file or directory) while connecting to upstream, client: 104.217.680.13, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/home/php-fpm/sock/.sock:", host: "52.610.822.538"

Hi, are you using Kloxo-MR 6.5?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline cmdman

  • Senior Member
  • *
  • Posts: 298
  • Karma: +1/-0
    • View Profile
Re: site get erorr 502 bad gateway nginx
« Reply #6 on: 2015-04-07, 18:54:11 »
yes i have 6.5 , how to change fastcgi children' until 60

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: site get erorr 502 bad gateway nginx
« Reply #7 on: 2015-04-07, 19:00:49 »
yes i have 6.5 , how to change fastcgi children' until 60
For 6.5, need modified php-fpm template manually. For 7.0, automatically from panel.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline cmdman

  • Senior Member
  • *
  • Posts: 298
  • Karma: +1/-0
    • View Profile
Re: site get erorr 502 bad gateway nginx
« Reply #8 on: 2015-04-07, 19:08:54 »
i moved to apache as ngixn giveing  so many errors iam geting this error

/script/restart-all: line 23: /etc/init.d/httpd: Permission denied


Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: site get erorr 502 bad gateway nginx
« Reply #9 on: 2015-04-07, 19:12:54 »
Try 'yum reinstall httpd* mod_* -y; sh /script/fixweb; sh /script/restart-web'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline cmdman

  • Senior Member
  • *
  • Posts: 298
  • Karma: +1/-0
    • View Profile
Re: site get erorr 502 bad gateway nginx
« Reply #10 on: 2015-04-07, 19:20:49 »
[root@server ~]# yum reinstall httpd* mod_* -y
Loaded plugins: fastestmirror, priorities, protectbase, replace, security
Setting up Reinstall Process
Loading mirror speeds from cached hostfile
 * Webmin: webmin.mirror.somersettechsolutions.co.uk
 * base: centos.mirror.fr.planethoster.net
 * extras: centos.mirror.fr.planethoster.net
 * mratwork-epel: mirrors.ircam.fr
 * mratwork-ius-stable: mirrors.ircam.fr
 * updates: centos.quelquesmots.fr
0 packages excluded due to repository protections
Resolving Dependencies
--> Running transaction check
---> Package httpd24u.x86_64 0:2.4.12-4.ius.el6 will be reinstalled
---> Package httpd24u-filesystem.noarch 0:2.4.12-4.ius.el6 will be reinstalled
---> Package httpd24u-tools.x86_64 0:2.4.12-4.ius.el6 will be reinstalled
---> Package mod_fastcgi.x86_64 0:2.4.7-3.mr.el6 will be reinstalled
---> Package mod_rpaf.x86_64 0:0.6-4.mr.el6 will be reinstalled
---> Package mod_ruid2.x86_64 0:0.9.8-2.el6 will be reinstalled
--> Processing Dependency: httpd-mmn = 20051115 for package: mod_ruid2-0.9.8-2.el6.x86_64
---> Package mod_ssl.x86_64 1:2.2.29-1.mr.el6 will be reinstalled
---> Package mod_suphp.x86_64 0:0.7.2-1.mr.el5 will be reinstalled
--> Running transaction check
---> Package httpd.x86_64 0:2.2.29-1.mr.el6 will be installed
--> Processing Dependency: httpd-tools = 2.2.29-1.mr.el6 for package: httpd-2.2.29-1.mr.el6.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.2.29-1.mr.el6 will be installed
--> Processing Conflict: httpd24u-2.4.12-4.ius.el6.x86_64 conflicts httpd < 2.4.12
--> Processing Conflict: httpd24u-tools-2.4.12-4.ius.el6.x86_64 conflicts httpd-tools < 2.4.12
--> Processing Conflict: httpd24u-tools-2.4.12-4.ius.el6.x86_64 conflicts httpd-tools < 2.4.12
--> Processing Conflict: httpd24u-2.4.12-4.ius.el6.x86_64 conflicts httpd < 2.4.12
--> Finished Dependency Resolution
Error: httpd24u conflicts with httpd-2.2.29-1.mr.el6.x86_64
Error: httpd24u-tools conflicts with httpd-tools-2.2.29-1.mr.el6.x86_64
 You could try using --skip-broken to work around the problem
** Found 4 pre-existing rpmdb problem(s), 'yum check' output follows:
mod_ruid2-0.9.8-2.el6.x86_64 has missing requires of httpd-mmn = ('0', '20051115', None)
1:mod_ssl-2.2.29-1.mr.el6.x86_64 has missing requires of httpd = ('0', '2.2.29', '1.mr.el6')
1:mod_ssl-2.2.29-1.mr.el6.x86_64 has missing requires of httpd-mmn = ('0', '20051115', None)
php54-5.4.39-1.ius.el6.x86_64 has missing requires of httpd-mmn = ('0', '20051115', None)
[root@server ~]# yum pdate
Loaded plugins: fastestmirror, priorities, protectbase, replace, security
No such command: pdate. Please use /usr/bin/yum --help
[root@server ~]# yum update
Loaded plugins: fastestmirror, priorities, protectbase, replace, security
Setting up Update Process
Loading mirror speeds from cached hostfile
 * Webmin: webmin.mirror.somersettechsolutions.co.uk
 * base: centos.mirror.fr.planethoster.net
 * extras: centos.mirror.fr.planethoster.net
 * mratwork-epel: mirrors.ircam.fr
 * mratwork-ius-stable: mirrors.ircam.fr
 * updates: centos.quelquesmots.fr
0 packages excluded due to repository protections
No Packages marked for Update

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: site get erorr 502 bad gateway nginx
« Reply #11 on: 2015-04-07, 19:25:52 »
Try 'yum replace httpd24 --replace-with=httpd; yum reinstall httpd* mod_* -y'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.06 seconds with 18 queries.

web stats analysis