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. 2018-07-21, 05:37:00

Author Topic: nginxproxy+php-fpm crashing with 502 errors  (Read 8631 times)

0 Members and 1 Guest are viewing this topic.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,382
  • Karma: +115/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #15 on: 2017-01-03, 12:11:46 »
This seems to be an issue:

2017/01/03 09:38:01 [error] 32590#32590: *65230 limiting connections by zone "conn_limit_per_ip", client: 62.210.81.90, server: xxx.pl, request: "HEAD /test.php HTTP/2.0", host: "xxx.pl"
This is to handle DDOS attack
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,962
  • Karma: +1/-0
    • View Profile
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #16 on: 2017-01-03, 12:48:14 »
This seems to be an issue:

2017/01/03 09:38:01 [error] 32590#32590: *65230 limiting connections by zone "conn_limit_per_ip", client: 62.210.81.x, server: xxx.pl, request: "HEAD /test.php HTTP/2.0", host: "xxx.pl"
This is to handle DDOS attack

But blocks normal connections too...

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,382
  • Karma: +115/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #17 on: 2017-01-03, 13:29:34 »
What's you mean 'normal connection'. They blocked external IP.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,962
  • Karma: +1/-0
    • View Profile
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #18 on: 2017-01-03, 14:46:36 »
What's you mean 'normal connection'. They blocked external IP.

That's actually my server IP :( I use many cron jobs.

That helped a little bit, now also disabled pagespeed which is also causing stability issues.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,962
  • Karma: +1/-0
    • View Profile
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #19 on: 2017-01-03, 14:54:14 »
What's this ?

[FastCGI: neither POLLIN nor POLLOUT...]

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,962
  • Karma: +1/-0
    • View Profile
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #20 on: 2017-01-05, 00:28:33 »
I've downgraded from PHP 7.1.0 to 7.0.14 for testing purposes. I think it was way more stable.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,962
  • Karma: +1/-0
    • View Profile
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #21 on: 2017-01-05, 16:03:33 »
I didn't helped. I'm testing new php config now.

Quote
pm.max_children = 64
pm.start_servers = 16
pm.min_spare_servers = 16
pm.max_spare_servers = 64
pm.max_requests = 20000

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,382
  • Karma: +115/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #22 on: 2017-01-06, 06:42:54 »
Try using 'pm=dynamic' instead "pm=ondemand"
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,962
  • Karma: +1/-0
    • View Profile
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #23 on: 2017-01-06, 14:45:36 »
Try using 'pm=dynamic' instead "pm=ondemand"

Changed that as well.

I've also disabled this - this simply doesn't work well for high-traffic websites:

Quote
#    limit_conn_zone $binary_remote_addr zone=conn_limit_per_ip:10m;
#    limit_req_zone $binary_remote_addr zone=req_limit_per_ip:10m rate=10r/s;

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,962
  • Karma: +1/-0
    • View Profile
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #24 on: 2017-01-07, 12:16:36 »
Still crashing !

Quote
[07-Jan-2017 04:11:07] ERROR: FPM initialization failed
[07-Jan-2017 04:11:07] ERROR: FPM initialization failed
[07-Jan-2017 04:11:07] ERROR: FPM initialization failed
[07-Jan-2017 11:31:21] ERROR: FPM initialization failed
[07-Jan-2017 11:31:30] ERROR: FPM initialization failed
[07-Jan-2017 12:10:03] ERROR: FPM initialization failed
[07-Jan-2017 12:10:03] ERROR: FPM initialization failed
[07-Jan-2017 12:10:03] ERROR: FPM initialization failed
[07-Jan-2017 12:10:03] ERROR: FPM initialization failed
[07-Jan-2017 13:10:03] ERROR: FPM initialization failed
[07-Jan-2017 13:10:03] ERROR: FPM initialization failed
[07-Jan-2017 13:10:04] ERROR: FPM initialization failed
[07-Jan-2017 13:10:04] ERROR: FPM initialization failed

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,382
  • Karma: +115/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #25 on: 2017-01-07, 12:49:13 »
Try 'pkill -9 php-fpm; sh /script/restart-web'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,962
  • Karma: +1/-0
    • View Profile
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #26 on: 2017-01-07, 13:16:36 »
Try 'pkill -9 php-fpm; sh /script/restart-web'.

It helps for just 20 minutes, then again pages are loading indefinitely until I restart php-fpm.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,962
  • Karma: +1/-0
    • View Profile
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #27 on: 2017-01-07, 13:28:22 »
I've switched from php71w to php71u. Maybe we can add remi's php71 ?

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,962
  • Karma: +1/-0
    • View Profile
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #28 on: 2017-01-07, 13:40:44 »
Now testing:
pm.max_children = 2
pm.start_servers = 2
pm.min_spare_servers = 2
pm.max_spare_servers = 2
pm.max_requests = 20000

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,382
  • Karma: +115/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: nginxproxy+php-fpm crashing with 502 errors
« Reply #29 on: 2017-01-07, 13:49:27 »
Now testing:
pm.max_children = 2
pm.start_servers = 2
pm.min_spare_servers = 2
pm.max_spare_servers = 2
pm.max_requests = 20000
Are you serious with 'pm.max_children=2'?.
..:: 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.05 seconds with 23 queries.

web stats analysis