October 04, 2012 01:12PM
My best suggestion would be to look through your nginx and php settings to limit the amount of persistent connections and total connections (both to mysql and to your site(s)). The more persistent connections there are, the more processes on your server and web browsers accessing the site will be able to maintain a single connection each, so limitting those will force it to cut off anything inactive or taking too long when it reaches that limit.

Unfortunately I don't have the experience to come clsoe to suggesting good values for you. My best advice would be to check for general recommendations on Google et al., then pick what you feel is safe and adjust over time until you feel you hit the right values.

Another option would be to enable gzip within nginx, (add "gzip on;" without quotes to nginx.conf), then use Google to research what browsers don't support gzip. You can blacklist those browser by adding something similar to:

gzip_disable "msie6";

to nginx.conf, placing all the browser UA strings within quotes. That way, nginx will automatically use gzip compression for browsers that are not blacklisted, which will save bandwidth. There are also various options you can add to nginx.conf (I think the default has them commented out by default) to tweak this further.

There are plenty of other things you can do to optimize things, most of which you can find quite easily in the nginx wiki and via Google et al. Search for things like "nginx optimization", "nginx and php-fpm optimization", and "nginx and php-fpm and mysql optimization".

--
Piki
Subject Author Posted

Please help with optimization

otherjohn October 04, 2012 12:21AM

Re: Please help with optimization

Stefan Caunter October 04, 2012 05:18AM

Re: Please help with optimization

otherjohn October 04, 2012 07:32AM

Re: Please help with optimization

Piki October 04, 2012 01:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 253
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready