-1

I have two boxes:

A: IIS 8.5.9600 on Windows Server 2012 R2

B: IIS 8.0.9200 on Windows Server 2012

php version is the same: 7.4.13

when a simple php script in box A outputs more than 4MB I get in the browser: NS_ERROR_NET_RESET

On the other hand, this does not happen on Box B, it seems immune.

I have narrowed down it happening when just a simple query from the db brings a 7MB text, but the problem occurs as soon as I pass 4MB.

but the query is not necessary, even this simple script causes the problem:

$s = str_repeat("a", 4200000);
//just a string with length slightly more than 4MB
echo $s;

So it happens when the output from php is larger than 4MB

  • (IIS) maxAllowedContentLength is at 30MB so not an issue (checked it in iis manager)
  • (PHP) memory_limit = 256MB so not an issue (checked it in php.ini)

edit: the error i get in IIS error logs is Request_Cancelled

How can I further find out the root of the problem and solve this?

Thank you in advance

2
  • 1
    I don't actually know the answer to this question, but you should definitely use a more recent (and supported) OS.
    – Massimo
    Dec 2 at 0:50
  • @Massimo I know that you mean that I should use like windows server 2016 or newer. Funny thing is, In my case, the most recent one (Windows Server 2008 R2 IIS 8.5) has the problem but the older one (Windows Server 2008 iis 8.0), does not. Dec 3 at 8:56

0

Browse other questions tagged .