nginx - 502 error due to PHP crashes with signal 6 (SIGABRT) or 11 (SIGSEGV) -


i've seen lot of posts others 502 error due php crashes signal 6 (sigabrt) or 11 (sigsegv) unfortunately none of provided solution fixes mine. i'm in process trace of core dump , using valgrind memcheck in meantime, want post here see if of have hint or procedure debug this.

here's happen: various scripts crash @ kind of random places of time after main script exits/returns (with no error), i.e., class destructor/shutdown methods called , last line in main script gets executed.

  • nginx error: 2015/06/23 03:57:37 [error] 10930#0: *318186 recv() failed (104: connection reset peer) while reading response header upstream, client: 68.71.252.49, server: , request: "post /rest/user-logout.php http/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "xyz"
  • php-fpm error: [18-jun-2015 04:14:51] warning: [pool www] child 22018 exited on signal 6 (sigabrt) after 548.942578 seconds start

important notes:

  • the servers not under high load (never "server reached pm.max_children setting").
  • reduce pm.max_requests low number reduces frequency of crashes

php-fpm statuses seem normal. i've tried settings combination won't post them here i'll post whatever need know.

here's example code snippet understand constructs , usages:

class job {   function execute() {     // following code in separate classes listed here easier follow.     $cache = new memcached();     $cache->addserver(...);      $link = mysqli_init(...);     mysqli_real_connect($link, ...);      $res = $cache->get(...);     if (!$res) {       $res = mysqli_query($link, $sql);     }     // process result.   } } $job = new job(); $job->execute(); // of time, crashes after last line (i.e. after invoking destructor/shutdown hook). 
  • nginx => 1.6.2
  • php/php-fpm version => 5.3.19
  • libcouchbase version => 2.5.0
  • memcached version => 2.1.0
  • mysql client api version => 5.5.28

-frank

p.s. i'll post these questions in separate topics: happen after script exits/returns (besides saving session)? in other words, php-fpm process when gets returned pool (e.g. class states, static variables)? either close database connections explicitly or closed automatically.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -