Welcome! Log In Create A New Profile

Advanced

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:


<?php

$str = '';
while(strlen($str)<524297){
$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 = '';
while(strlen($str)<524297){
$str .= memory_get_usage().'<br />';
}

echo $str;


Which gets up to

772616
7726

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

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


$start = microtime(true);
while(strlen($str)<524297){
$str .= (microtime(true)-$start).'<br />';
}

echo $str;


0.0083520412445068
0.0083539485931396
0.008357048034668

( 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.

Thanks!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 114
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready