Author Topic: PHP-CGI Killing Server Resources | CWP  (Read 7648 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
PHP-CGI Killing Server Resources | CWP
« on: July 10, 2020, 01:43:32 PM »
Hi

I am using CWP7.Admin , WebServer : Nginx + Apache + PHP-CGI , Php version: 7.3
My Website is on laravel . visitor 100 per day . It's killing my resources and server Load average is very high . Please check snapshop and any idea to fix .

It was smoothly running on Cpanel VPS with 1GB RAM. After transfer to CWP , it's can handle PHP request .


Re: PHP-CGI Killing Server Resources | CWP
« Reply #1 on: July 10, 2020, 02:00:35 PM »
Looks pretty obvious from the processes; you're consuming too much RAM, for your server specification.
Remove varnish and run mysqltuner - follow its' advice (apart from cache nonsense).

Fine tuning of nginx/Apache also required. With a reverse-proxy nginx, Apache can be paired back significantly if not serving too many requests to mySQL/maria.
Think that you also need to reduce keep-alive timeout, if indeed you enabled it, which you should.

All standard stuff required of a system administrator.
« Last Edit: July 10, 2020, 02:08:03 PM by cynique »

Offline
*
Re: PHP-CGI Killing Server Resources | CWP
« Reply #2 on: July 10, 2020, 05:41:24 PM »
Hi

Keep Alive Time for nginx :
Code: [Select]
keepalive_timeout 60 60;

Re: PHP-CGI Killing Server Resources | CWP
« Reply #3 on: July 10, 2020, 11:07:56 PM »
..and? I can't tell you what values to use. Read some documentation and reduce gradually, restarting Apache/nginx each time.
That deals with only one aspect of my initial response.

Offline
*
Re: PHP-CGI Killing Server Resources | CWP
« Reply #4 on: July 17, 2020, 07:55:18 PM »
..and? I can't tell you what values to use. Read some documentation and reduce gradually, restarting Apache/nginx each time.
That deals with only one aspect of my initial response.


Hi
Problem is fixed when i used Laravel session to Database instead of file. And Found Redis is better than Database for Laravel Session management.

Offline
*
Re: PHP-CGI Killing Server Resources | CWP
« Reply #5 on: July 24, 2020, 04:46:18 AM »