MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Development => Topic started by: fossxplorer on 2016-04-05, 20:09:28

Title: Repeating Kloxo Error 500
Post by: fossxplorer on 2016-04-05, 20:09:28
Too often many of our clients get the error in subject and web page is broken.
Its a php issue it seems as a /scripts/fixphp --cloent=myclient fixes it.
But we cant have it likethis, its been a problem for years and we can loose clients.
Why does this occur??
Title: Re: Repeating Kloxo Error 500
Post by: MRatWork on 2016-04-06, 02:52:13
Maybe you need optimize php for this client like increasing fastcgi_children (default: unlimited as equal as 6).
Title: Re: Repeating Kloxo Error 500
Post by: fossxplorer on 2016-04-06, 13:23:02
Sure, but this doesn't happen on 1 client, but many of the clients, often at same time.
I use PHP-FPM, with higher values than normal. Where can i do these changes permanently?



Really annoying and we need to find a solution, otherwise i have to give up Kloxo-MR.




Maybe you need optimize php for this client like increasing fastcgi_children (default: unlimited as equal as 6).
Title: Re: Repeating Kloxo Error 500
Post by: MRatWork on 2016-04-06, 13:31:19
Check php error log.
Title: Re: Repeating Kloxo Error 500
Post by: fossxplorer on 2016-04-12, 16:21:20
This is what's hapenning:

[Tue Apr 12 16:32:11 2016] [fastcgi:error] [pid 18089] [mod_fastcgi.c(2292):] [FastCGI: comm with server "/home/user001/website.example.com/website.example.com.0fake" aborted: read failed] [website.example.com]
[Tue Apr 12 16:32:11 2016] [core:error] [pid 18089] [config.c(454):] [AH00524: Handler for fastcgi-script returned invalid result code 1] [website.example.com]
[Tue Apr 12 16:33:29 2016] [fastcgi:error] [pid 18089] [mod_fastcgi.c(2292):] [FastCGI: comm with server "/home/user001/website.example.com/website.example.com.0fake" aborted: read failed] [website.example.com]
[Tue Apr 12 16:33:29 2016] [core:error] [pid 18089] [config.c(454):] [AH00524: Handler for fastcgi-script returned invalid result code 1] [website.example.com]
Title: Re: Repeating Kloxo Error 500
Post by: fossxplorer on 2016-04-12, 16:25:40
How can i increase values inside  cat /etc/php-fpm.d/<user>.conf on a permanent basis and survice upgrade of Kloxo-MR?
Title: Re: Repeating Kloxo Error 500
Post by: MRatWork on 2016-04-12, 16:43:46
How can i increase values inside  cat /etc/php-fpm.d/<user>.conf on a permanent basis and survice upgrade of Kloxo-MR?

In 'advanced php configure' for certain client.
Title: Re: Repeating Kloxo Error 500
Post by: fossxplorer on 2016-04-13, 11:22:34
I need to change values such as
pm.max_children = 10
pm.start_servers = 6
pm.min_spare_servers = 3
pm.max_spare_servers = 6
pm.max_requests = 1000

I can't do it from In 'advanced php configure' for certain client, but only max/min time, memory etc.
Is this done is the custom php53 file? Does it still work?


How can i increase values inside  cat /etc/php-fpm.d/<user>.conf on a permanent basis and survice upgrade of Kloxo-MR?

In 'advanced php configure' for certain client.
Title: Re: Repeating Kloxo Error 500
Post by: fossxplorer on 2016-04-13, 11:44:09
Ok, i was able to increase the values using /opt/configs/php-fpm/tpl/custom.php53-fpm-pool.conf.tpl.
Let's see if that fixes this issue :)
Title: Re: Repeating Kloxo Error 500
Post by: MRatWork on 2016-04-13, 12:36:56
Hi, just set 'fastcgi childrens' (unlimited = 6) in 'limit' for certain. No need modified .tpl if using Kloxo-MR 7.
Title: Re: Repeating Kloxo Error 500
Post by: fossxplorer on 2016-04-14, 14:23:11
Still getting the error :( and site going down specially on this customer site. Can't understand why:

The PHP-FPM config for that customer is:
pm = ondemand

pm.max_children = 200
pm.start_servers = 20
pm.min_spare_servers = 5
pm.max_spare_servers = 10
pm.max_requests = 1000

pm.process_idle_timeout = 20s

;pm.status_path = /status
;ping.path = /ping
;ping.response = pong
request_terminate_timeout = 1h
request_slowlog_timeout = 30s
slowlog = /var/log/php-fpm/slow.log
rlimit_files = 1024
rlimit_core = 0
;chroot = /home/linuxwonders
;chdir = /
catch_workers_output = yes

Do you think seting 'fastcgi childrens' (unlimited = 6) in 'limit' will help?
 
Title: Re: Repeating Kloxo Error 500
Post by: MRatWork on 2016-04-14, 14:35:29
How much your memory have?. Value of 'max_children' is too high.
Title: Re: Repeating Kloxo Error 500
Post by: fossxplorer on 2016-04-14, 21:01:13
8GB of RAM, but this is a low traffic server, i've never seen RAM usage over 4GB.
That's not the problem i think. Something causes the FPM process to hang and only /script/fixphp --client=clientname fixes it.

Really need to find a solution. Thankful for any help really.
Title: Re: Repeating Kloxo Error 500
Post by: MRatWork on 2016-04-14, 22:39:33
Try change 'pm.process_idle_timeout = 20s' to 'pm.process_idle_timeout = 60s'
Title: Re: Repeating Kloxo Error 500
Post by: fossxplorer on 2016-04-15, 09:38:00
Yep, that's actually what i did yesterday  after a bit of googling before reading your reply today.
I've done a service php-fpm reload to see how it behaves in the coming days.

Try change 'pm.process_idle_timeout = 20s' to 'pm.process_idle_timeout = 60s'
Title: Re: Repeating Kloxo Error 500
Post by: fossxplorer on 2016-05-12, 10:56:32
This seems to help. Where can i change this for all clients?