Welcome! Log In Create A New Profile

Advanced

502 Errors are the bane of my existence

Posted by Shaun Winters 
Shaun Winters
502 Errors are the bane of my existence
October 18, 2013 12:02PM
I'm running a production server with nginx and php-fpm ... I had a
configuration that worked for ages, but with recent botnet attacks towards
Wordpress, and generally increased traffic from search bots and actual
humans, we've been crippled with 502 errors, as I'm fairly sure php-fpm is
crashing.... hard.

So, this is our current www.conf .... any ideas what I'm doing wrong? We're
on a VPS with 4gb ram ... nginx, php-fpm, wordpress, APC, running 2
instances of Wordpress. If this config file looks like I have no clue what
I'm doing, it's because I have no clue what I'm doing.

[www]
;prefix = /path/to/pools/$pool
listen = 127.0.0.1:9000
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = dynamic
pm.max_children = 100
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 15
pm.max_requests = 50
pm.status_path = /fpmstatus
ping.path = /ping
ping.response = pong
request_terminate_timeout = 1000
request_slowlog_timeout = 1000
slowlog = /var/log/$pool.log.slow
;rlimit_files = 1024
;rlimit_core = 0
;chroot =
;chdir = /
catch_workers_output = yes
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f
www@my.domain.com
php_flag[display_errors] = on
php_admin_value[error_log] = /var/log/fpm-php.www.log
php_admin_flag[log_errors] = on
php_admin_value[memory_limit] = 256M
php_admin_value[date.timezone] = America/Toronto
php_value[upload_max_filesize] = 20M
php_value[max_execution_time] = 7

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Antony Dovgal
Re: 502 Errors are the bane of my existence
October 21, 2013 06:18AM
On 2013-10-18 19:39, Shaun Winters wrote:
> I'm running a production server with nginx and php-fpm ... I had a configuration that worked for ages, but with recent botnet attacks towards Wordpress, and generally increased traffic from search bots and actual humans, we've been crippled with 502 errors, as I'm fairly sure php-fpm is crashing..... hard.

If it's crashing, it should be in the log.
What do you see there?

--
Wbr,
Antony Dovgal
---
http://pinba.org - realtime profiling for PHP

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 292
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