Want more timely Centmin Mod News Updates?
Become a Member

PHP-FPM php-fop not running or keeps terminating

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Afterward, Oct 8, 2014.

  1. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    8:24 AM
    1.7.5
    5.5
    I often see my site have 502 nginx getaway error, and when i go into ssh and check php-fpm service
    Code:
    Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
    Starting php-fpm  done
    
    Now site come back and work as usual then suddenly php-fpm stops again.
    Went to /var/log/php-fpm and check error log
    Code:
    [20-Sep-2014 14:36:43] WARNING: [pool www] server reached max_children setting (50), consider raising it
    [22-Sep-2014 15:16:04] WARNING: [pool www] server reached max_children setting (50), consider raising it
    [22-Sep-2014 20:03:24] WARNING: [pool www] server reached max_children setting (50), consider raising it
    [03-Oct-2014 16:18:32] WARNING: [pool www] server reached max_children setting (50), consider raising it
    [08-Oct-2014 11:02:51] WARNING: [pool www] server reached max_children setting (50), consider raising it
    [08-Oct-2014 11:03:29] WARNING: [pool www] child 7218 exited on signal 11 (SIGSEGV) after 38.481076 seconds from start
    [08-Oct-2014 11:03:29] WARNING: [pool www] child 7159 exited on signal 11 (SIGSEGV) after 2851.187561 seconds from start
    [08-Oct-2014 11:03:29] WARNING: [pool www] child 7223 exited on signal 11 (SIGSEGV) after 38.435784 seconds from start
    [08-Oct-2014 11:03:29] WARNING: [pool www] child 7232 exited on signal 11 (SIGSEGV) after 38.299550 seconds from start
    [08-Oct-2014 11:03:29] WARNING: [pool www] child 7242 exited on signal 11 (SIGSEGV) after 38.184014 seconds from start
    [08-Oct-2014 11:03:29] WARNING: [pool www] child 7238 exited on signal 11 (SIGSEGV) after 38.351259 seconds from start
    [08-Oct-2014 11:03:29] WARNING: [pool www] child 7247 exited on signal 11 (SIGSEGV) after 38.144501 seconds from start
    [08-Oct-2014 11:03:29] WARNING: [pool www] child 7222 exited on signal 11 (SIGSEGV) after 38.517037 seconds from start
    [08-Oct-2014 11:03:29] WARNING: [pool www] child 7225 exited on signal 11 (SIGSEGV) after 38.516926 seconds from start
    [08-Oct-2014 11:03:29] WARNING: [pool www] child 7258 exited on signal 11 (SIGSEGV) after 0.077885 seconds from start
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:29] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:31] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:31] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:03:32] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    /usr/local/sbin/php-fpm: error while loading shared libraries: libncurses.so.5: cannot open shared object file: Cannot allocate memory
    [08-Oct-2014 11:13:35] WARNING: [pool www] server reached max_children setting (50), consider raising it
    [08-Oct-2014 11:16:30] WARNING: [pool www] child 7436 exited on signal 11 (SIGSEGV) after 175.746030 seconds from start
    [08-Oct-2014 11:16:32] WARNING: [pool www] child 7438 exited on signal 11 (SIGSEGV) after 177.363035 seconds from start
    [08-Oct-2014 11:16:32] WARNING: [pool www] child 7420 exited on signal 11 (SIGSEGV) after 178.198976 seconds from start
    [08-Oct-2014 11:16:32] WARNING: [pool www] child 7397 exited on signal 11 (SIGSEGV) after 240.046392 seconds from start
    [08-Oct-2014 11:16:32] WARNING: [pool www] child 7465 exited on signal 11 (SIGSEGV) after 0.183210 seconds from start
    [08-Oct-2014 11:16:32] WARNING: [pool www] child 7414 exited on signal 11 (SIGSEGV) after 178.880495 seconds from start
    [08-Oct-2014 11:16:32] WARNING: [pool www] child 7441 exited on signal 11 (SIGSEGV) after 177.746648 seconds from start
    [08-Oct-2014 11:16:32] WARNING: [pool www] child 7454 exited on signal 11 (SIGSEGV) after 176.808704 seconds from start
    [08-Oct-2014 11:16:32] WARNING: [pool www] child 7467 exited on signal 11 (SIGSEGV) after 0.134667 seconds from start
    [08-Oct-2014 11:16:32] WARNING: [pool www] child 7462 exited on signal 11 (SIGSEGV) after 2.469572 seconds from start
    [08-Oct-2014 11:16:32] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:16:32] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:16:33] WARNING: [pool www] child 7487 exited on signal 11 (SIGSEGV) after 0.072472 seconds from start
    [08-Oct-2014 11:16:33] WARNING: [pool www] child 7488 exited on signal 11 (SIGSEGV) after 0.082313 seconds from start
    [08-Oct-2014 11:16:33] WARNING: [pool www] child 7496 exited on signal 11 (SIGSEGV) after 0.013748 seconds from start
    [08-Oct-2014 11:16:33] WARNING: [pool www] child 7475 exited on signal 11 (SIGSEGV) after 0.215175 seconds from start
    [08-Oct-2014 11:16:33] WARNING: [pool www] child 7485 exited on signal 11 (SIGSEGV) after 0.161885 seconds from start
    [08-Oct-2014 11:16:33] WARNING: [pool www] child 7480 exited on signal 11 (SIGSEGV) after 0.227079 seconds from start
    [08-Oct-2014 11:16:33] WARNING: [pool www] child 7492 exited on signal 11 (SIGSEGV) after 0.102933 seconds from start
    [08-Oct-2014 11:16:33] WARNING: [pool www] child 7473 exited on signal 11 (SIGSEGV) after 0.287991 seconds from start
    [08-Oct-2014 11:16:33] WARNING: [pool www] child 7479 exited on signal 11 (SIGSEGV) after 0.276810 seconds from start
    [08-Oct-2014 11:16:33] WARNING: [pool www] child 7512 exited on signal 11 (SIGSEGV) after 0.018786 seconds from start
    [08-Oct-2014 11:16:33] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:16:33] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:16:33] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:16:33] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:16:33] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:16:33] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [08-Oct-2014 11:16:34] ERROR: Unable to create the PID file (/var/run/php-fpm/php-fpm.pid).: Cannot allocate memory (12)
    [08-Oct-2014 11:16:34] ERROR: Unable to create the PID file (/var/run/php-fpm/php-fpm.pid).: Cannot allocate memory (12)
    [08-Oct-2014 11:16:34] ERROR: FPM initialization failed
    [08-Oct-2014 11:16:34] ERROR: FPM initialization failed
    
    Any clue what's causing this?
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,033
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    5:24 PM
    Nginx 1.13.x
    MariaDB 5.5
  3. RoldanLT

    RoldanLT Well-Known Member

    3,830
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    3:24 PM
    1.11
    10.2
    Post your server specs, And I will try to suggest best config based on what I learn from Floren and other great guys :)
     
    • Like Like x 1
  4. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    8:24 AM
    1.7.5
    5.5
    Mem info:
    Code:
    MemTotal:        2097152 kB
    MemFree:          833156 kB
    Cached:           222844 kB
    Buffers:               0 kB
    Active:           459280 kB
    Inactive:         314708 kB
    Active(anon):     331136 kB
    Inactive(anon):   220008 kB
    Active(file):     128144 kB
    Inactive(file):    94700 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    SwapTotal:             0 kB
    SwapFree:              0 kB
    Dirty:               168 kB
    Writeback:             0 kB
    AnonPages:        551144 kB
    Shmem:            143200 kB
    Slab:              23128 kB
    SReclaimable:       2204 kB
    SUnreclaim:        20924 kB
    
    Cpu info
    Code:
    processor    : 0
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 62
    model name    : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
    stepping    : 4
    cpu MHz        : 3700.166
    cache size    : 10240 KB
    physical id    : 0
    siblings    : 8
    core id        : 0
    cpu cores    : 4
    apicid        : 0
    initial apicid    : 0
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 13
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
    bogomips    : 7400.33
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 46 bits physical, 48 bits virtual
    power management:
    
    processor    : 1
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 62
    model name    : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
    stepping    : 4
    cpu MHz        : 3700.166
    cache size    : 10240 KB
    physical id    : 0
    siblings    : 8
    core id        : 1
    cpu cores    : 4
    apicid        : 2
    initial apicid    : 2
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 13
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
    bogomips    : 7400.33
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 46 bits physical, 48 bits virtual
    power management:
    
    processor    : 2
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 62
    model name    : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
    stepping    : 4
    cpu MHz        : 3700.166
    cache size    : 10240 KB
    physical id    : 0
    siblings    : 8
    core id        : 2
    cpu cores    : 4
    apicid        : 4
    initial apicid    : 4
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 13
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
    bogomips    : 7400.33
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 46 bits physical, 48 bits virtual
    power management:
    
    processor    : 3
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 62
    model name    : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
    stepping    : 4
    cpu MHz        : 3700.166
    cache size    : 10240 KB
    physical id    : 0
    siblings    : 8
    core id        : 3
    cpu cores    : 4
    apicid        : 6
    initial apicid    : 6
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 13
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
    bogomips    : 7400.33
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 46 bits physical, 48 bits virtual
    power management:
    
    processor    : 4
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 62
    model name    : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
    stepping    : 4
    cpu MHz        : 3700.166
    cache size    : 10240 KB
    physical id    : 0
    siblings    : 8
    core id        : 0
    cpu cores    : 4
    apicid        : 1
    initial apicid    : 1
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 13
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
    bogomips    : 7400.33
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 46 bits physical, 48 bits virtual
    power management:
    
    processor    : 5
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 62
    model name    : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
    stepping    : 4
    cpu MHz        : 3700.166
    cache size    : 10240 KB
    physical id    : 0
    siblings    : 8
    core id        : 1
    cpu cores    : 4
    apicid        : 3
    initial apicid    : 3
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 13
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
    bogomips    : 7400.33
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 46 bits physical, 48 bits virtual
    power management:
    
    processor    : 6
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 62
    model name    : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
    stepping    : 4
    cpu MHz        : 3700.166
    cache size    : 10240 KB
    physical id    : 0
    siblings    : 8
    core id        : 2
    cpu cores    : 4
    apicid        : 5
    initial apicid    : 5
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 13
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
    bogomips    : 7400.33
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 46 bits physical, 48 bits virtual
    power management:
    
    processor    : 7
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 62
    model name    : Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
    stepping    : 4
    cpu MHz        : 3700.166
    cache size    : 10240 KB
    physical id    : 0
    siblings    : 8
    core id        : 3
    cpu cores    : 4
    apicid        : 7
    initial apicid    : 7
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 13
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
    bogomips    : 7400.33
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 46 bits physical, 48 bits virtual
    power management:
    
    Is this enough?
     
  5. RoldanLT

    RoldanLT Well-Known Member

    3,830
    929
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,258
    Local Time:
    3:24 PM
    1.11
    10.2
    So you have 2GB ram and 4 cpu cores?
     
  6. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    8:24 AM
    1.7.5
    5.5
    Correct.
     
  7. eva2000

    eva2000 Administrator Staff Member

    29,033
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    5:24 PM
    Nginx 1.13.x
    MariaDB 5.5
    i'd give ya one tip, you're running out of memory based on number of max_children you assigned to PHP-FPM = 50 see
    Code:
    [08-Oct-2014 11:16:34] ERROR: Unable to create the PID file (/var/run/php-fpm/php-fpm.pid).: Cannot allocate memory (12)
    [08-Oct-2014 11:16:34] ERROR: Unable to create the PID file (/var/run/php-fpm/php-fpm.pid).: Cannot allocate memory (12)
    my 2 links posted at PHP-FPM - php-fop not running or keeps terminating | Centmin Mod Community are relevant
     
    • Like Like x 1
  8. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    8:24 AM
    1.7.5
    5.5
    Yea i actually got an out of memory error as well, i will check that out, thanks.