Nginx - Only handles exactly 500 request per second - How to increase the limit?

2018-01-23 Thread agriz
worker_processes auto; pid /run/nginx.pid; worker_rlimit_nofile 10; error_log /var/log/nginx/error.log crit; events { worker_connections 4000; multi_accept on; use epoll; } http { include /etc/nginx/mime.types; sendfile on; tcp_nopush on; tcp_nodelay on; directio 4m;

Re: How to force php-fpm to display slow log?

2017-10-24 Thread agriz
Sir, codeigniter is executing everything from index.php The coding which has been done are in the controller, model and view folders. The actual url which user see is different. It is routed. Can we get that url? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,277048,277050#msg-277050

How to force php-fpm to display slow log?

2017-10-24 Thread agriz
slowlog = /var/log/php-fpm/slow.log request_slowlog_timeout = 1s This following two lines are added in the php config file. Once it is added and restart php-fpm, the slow.log file is created. (request: "GET /index.php") executing too slow (1.072177 sec), logging This error is displayed in

Re: E3-1240 with 32GB Ram - Unable to set the optimal value for the server

2017-10-16 Thread agriz
I forget to mention. during night, there wont be any visitors. It is only for specific regions. website will be busy during the morning time. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,276892,276910#msg-276910 ___ nginx mailing list

Re: E3-1240 with 32GB Ram - Unable to set the optimal value for the server

2017-10-16 Thread agriz
I am getting these kind of warning in php fpm log NOTICE: [pool www] child 25826 exited with code 0 after 864.048588 seconds from start NOTICE: [pool www] child 6580 started Sir, I am still looking for a way to monitor nginx performance. But i am not able to find the solution in internet. Can

Re: E3-1240 with 32GB Ram - Unable to set the optimal value for the server

2017-10-16 Thread agriz
php fpm status pool: www process manager: dynamic start time: 17/Oct/2017:00:55:44 -0400 start since: 2077 accepted conn:183360 listen queue: 0 max listen queue: 0 listen queue len: 0 idle processes: 28 active processes: 3

Re: E3-1240 with 32GB Ram - Unable to set the optimal value for the server

2017-10-16 Thread agriz
Sir reading some info, i guess i cant tell any number blindly without test. I think I can first try to give these values max_children = 100 start server = 34 spareserver min and max = 20 & 50 We have around 20GB free Ram all the time. Why can't we use it for php-fpm? Are those values safe to

Re: E3-1240 with 32GB Ram - Unable to set the optimal value for the server

2017-10-16 Thread agriz
I am in the field now. I asked my friend to get the info you asked. This is what i received php-fpm is using unix sockets (I know this. I configured this) tcp0 0 TIME_WAIT tcp0 0 TIME_WAIT tcp0 0 TIME_WAIT tcp0 0

Re: E3-1240 with 32GB Ram - Unable to set the optimal value for the server

2017-10-16 Thread agriz
Sir, Thank you for your reply. This is a live server. It is an NPO (non profit organisation). I pay for the server and maintaining it. We cant afford to a admin. It will be a great help if you can solve this. People are visiting for registering complains and viewing our activity. all php pages

Re: E3-1240 with 32GB Ram - Unable to set the optimal value for the server

2017-10-16 Thread agriz
Reduced to 4k visitors from 10k :( Posted at Nginx Forum: https://forum.nginx.org/read.php?2,276892,276898#msg-276898 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: E3-1240 with 32GB Ram - Unable to set the optimal value for the server

2017-10-16 Thread agriz
Sir, Can you give me a rough values? I will play with them. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,276892,276896#msg-276896 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: E3-1240 with 32GB Ram - Unable to set the optimal value for the server

2017-10-16 Thread agriz
PID USER PR NIVIRTRESSHR S %CPU %MEM TIME+ COMMAND 22093 nginx 20 0 393060 11848 3828 S 31.9 0.0 10:17.70 php-fpm: pool www 1495 mysql 20 0 4793852 318444 9824 S 23.6 1.0 796:41.59 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql

E3-1240 with 32GB Ram - Unable to set the optimal value for the server

2017-10-16 Thread agriz
I am struggling to handle a traffic of 10K+ It will reach a lot. But my bad configuration is limiting them. www.conf pm.max_children = 400 pm.start_servers = 40 pm.min_spare_servers = 40 pm.max_spare_servers = 70 pm.max_requests = 800 nginx.conf worker_processes 3; events {

Re: Do i need mod_security for nginx?

2013-10-21 Thread agriz
[nginx-auth] enabled = true filter = nginx-auth action = iptables-multiport[name=NoAuthFailures, port=http,https] logpath = /var/log/nginx*/*error*.log bantime = 600 # 10 minutes maxretry = 6 [nginx-login] enabled = true filter = nginx-login action = iptables-multiport[name=NoLoginFailures,

Re: Which 404 file does nginx calls?

2013-10-20 Thread agriz
server_name .site.com; root /var/www/site.com; error_page 404 /404.php; access_log /var/log/nginx/site.access.log; index index.html index.php; if ($http_host != www.site.com) { rewrite ^ http://www.site.com$request_uri permanent; } location ~* \.php$ { # try_files $uri =