Welcome! Log In Create A New Profile


Nginx + PHP5-fpm doesn't complete the processing

Posted by oi_antz 
Nginx + PHP5-fpm doesn't complete the processing
November 14, 2013 07:58PM
I'm trying to convert from Apache to Nginx, and it's not going too bad. However, there is a problem that I've encountered with our API, which outputs quite a lot of stuff and can take up to 1 second when regenerating the cache. It seems to work ok from time to time, but most of the time the output is truncated to 24296 characters, consistently.

I've tried this script:


$str = '';
$str .= strlen($str).'<br />';

echo $str;

which outputs the following:

0<br />7<br />14<br />22<br />30<br /> [...etc...] />102284<br />102296<br />1023

A total of 102313 characters, every time. This indicates it could be a memory issue, so I did this instead:

$str = '';
$str .= memory_get_usage().'<br />';

echo $str;

Which gets up to


.. even though php.ini says memory_limit=512M

I wonder if it's a time limit, so I do this instead:

$start = microtime(true);
$str .= (microtime(true)-$start).'<br />';

echo $str;


( total of 89793 characters)

The thing I really don't understand, is why, if the string length has not exceeded 524297 characters, does it quit looping and start printing?

Pretty confident that solving this is the only thing holding us back from testing.

Sorry, only registered users may post in this forum.

Click here to login

Online Users

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