Frequency with which PHP-FCGI restarts if it crashes?

5 posts / 0 new
Last post
#1 Mon, 04/06/2015 - 16:54
Smalls

Frequency with which PHP-FCGI restarts if it crashes?

If php-fcgi crashes, it seems to restart itself after 10 minutes or so.

Is this a setting that can be adjusted? We have experienced crashes and the only way to get the site back online is to issue the following two commands or wait for PHP-FCGI to restart itself:

service php-fcgi-websitename-com restart service nginx restart

When we look in /var/logs/virtualmin/websiteWithProblem_ca_error_log, we see the following errors:

2015/04/06 13:38:52 [error] 28320#0: *645985 connect() to unix:/var/php-nginx/138143759027147.sock/socket failed (11: Resource temporarily unavailable) while connecting to upstream, client: 99.234.44.39, server: www.websiteWithProblem.ca, request: "GET /page.html HTTP/1.1", upstream: "fastcgi://unix:/var/php-nginx/138143759027147.sock/socket:", host: "www.websiteWithProblem.ca"

any ideas? We'd ideally like this setting to check itself every 30 seconds or so instead of 10 minutes or whatever interval it actually is.

Mon, 04/06/2015 - 17:06
andreychek

Howdy,

Hmm, it sounds like you may be running into some resource issues there.

What is the output of these commands:

free -m
cat /proc/user_beancounters
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head -10
dmesg | tail -30
Mon, 04/06/2015 - 17:20
Smalls

free -m
total used free shared buffers cached
Mem: 32045 24540 7504 1388 1019 8720
-/+ buffers/cache: 14801 17244
Swap: 16383 437 15946

cat /proc/user_beancounters
cat: /proc/user_beancounters: No such file or directory

netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head -10
47 100.43.117.250
17 142.205.241.253
16 127.0.0.1
12 75.158.148.86
9 50.65.72.53
9 207.161.88.243
6 99.226.194.13
6 24.230.242.199
5 24.150.137.241
5 144.76.26.177

dmesg | tail -30
ipmi_si: SMBIOS: io 0xca2 regsize 1 spacing 1 irq 0
ipmi_si: Adding SMBIOS-specified kcs state machine duplicate interface
ipmi_si: probing via SPMI
ipmi_si: SPMI: io 0xca2 regsize 1 spacing 1 irq 0
ipmi_si: Adding SPMI-specified kcs state machine duplicate interface
ipmi_si: Trying ACPI-specified kcs state machine at i/o address 0xca2, slave address 0x0, irq 0
ipmi_si 00:0f: Found new BMC (man_id: 0x002a7c, prod_id: 0x0806, dev_id: 0x20)
ipmi_si 00:0f: IPMI kcs interface initialized
md0:
iTCO_vendor_support: vendor-support=0
iTCO_wdt: Intel TCO WatchDog Timer Driver v1.07rh
iTCO_wdt: unable to reset NO_REBOOT flag, device disabled by hardware/BIOS
EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts:
EXT4-fs (md0): mounted filesystem with ordered data mode. Opts:
Adding 16777212k swap on /dev/mapper/vg_benjamin-lv_swap. Priority:-1 extents:1 across:16777212k D
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
ip6_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
ADDRCONF(NETDEV_UP): eth0: link is not ready
igb 0000:04:00.0: eth0: igb: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
type=1305 audit(1428035579.436:3): audit_pid=1586 old=0 auid=4294967295 ses=4294967295 res=1
md: data-check of RAID array md0
md: minimum _guaranteed_ speed: 1000 KB/sec/disk.
md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for data-check.
md: using 128k window, over a total of 204736k.
md: md0: data-check done.
Bridge firewalling registered

Mon, 04/06/2015 - 17:23
Smalls

I should probably mention this is on centos 6, nginx

Additionally, when php-fcgi crashes, the website is not accessible at all. Just a 502 bad gateway pops up.

Tue, 04/07/2015 - 08:03
Smalls

any ideas?

Topic locked