question

EmanuelHillberg-9113 avatar image
0 Votes"
EmanuelHillberg-9113 asked ·

IIS memory issue for reverse proxy for MJPEG stream

As topic.

I have set up my IIS (v 10.0.14393.0) with rules for a specific path to distribute a MJPEG stream I have locally on port 8081.

In a web page I have included a link to the specified path, <img src="/testfolder/videos/test.jpg'"></img>

It all works, but after loaded for a while the w3wp.exe process dies. (When looking in task manager I can see the memory used grows...)

I think this is because IIS caches all the images, but I am not sure.

I have asked this question before on the forums and only was adviced to do log of the problem. However reading and understanding the log did not do anything for me.


To set -up and see the issue:
Web structure:

webroot/

webroot/testfolder/videos/

webroot/testfolder/index.html

webroot/testfolder/web.config

web.config:

<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Reverse Proxy To videostream" enabled="true" stopProcessing="true"> <match url="^videos/(.)" /> <action type="Rewrite" url="http://2.248.130.108:81/mjpg/video.mjpg" /> </rule> </rules> <outboundRules> <rule name="Reverse Proxy Outboundrule to videostream" preCondition="ResponseIsHtml1" enabled="true"> <match filterByTags="A, Area, Base, Form, Frame, Head, Img, Link" pattern="^http://2.248.130.108:81/mjpg/video.mjpg" /> <action type="Rewrite" value="/testfolder/videos/test.jpg" /> </rule> <preConditions> <preCondition name="ResponseIsHtml1"> <add input="{RESPONSE_CONTENT_TYPE}" pattern="^(.)" /> </preCondition> </preConditions> </outboundRules> </rewrite> </system.webServer> </configuration>

index.html:

<img src="/testfolder/videos/test.jpg"></img>


I hope this is a configuration issue. It feels like the MHPEG is being cached by IIS somehow. (And I don't want that)


Kind regards, Emanuel

windows-server-iis-generalwindows-server-iis-configurationwindows-server-iis-troubleshooting
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SamWu-MSFT avatar image
0 Votes"
SamWu-MSFT answered ·

Hi @EmanuelHillberg-9113

You can use the Microsoft debug diagnostic tool to capture a hang dump to analyze the memory issue.

About how to use the Microsoft debug diagnostic tool to create a rule in Debug Diagnostic to automate a dump you can refer to below links:

debug-diagnostic-2-0-creating-a-memory-leak-rule-unmanaged-code

https://stackoverflow.com/a/44867575/13336642


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 9 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

is there any part of the debug you are more interested in?
It is quite big the one I created last year when I noticed this issue.
Has struggeled since then.

0 Votes 0 ·
SamWu-MSFT avatar image SamWu-MSFT EmanuelHillberg-9113 ·

@EmanuelHillberg-9113 Yes, this can better help you solve the problem.

0 Votes 0 ·

Hello @SamWu-MSFT ,
I have the logfiles on dropbox. Do you have an email I can share this with?

Kind regards, Emanuel

0 Votes 0 ·
Show more comments
SamWu-MSFT avatar image
0 Votes"
SamWu-MSFT answered ·

Hi @EmanuelHillberg-9113

To analyze the dump file, follow these steps:

  1. Click Start, click Run, type the path of the Debug Diagnostics tool, and then click OK. Note By default, the Debug Diagnostics tool is located in the C:\Program Files\DebugDiag folder.

  2. On the Advanced Analysis tab, click Add Data Files.

  3. Locate and then click the dump file that you want to analyze, and then click Open.

  4. On the Advanced Analysis tab, click Crash/Hang Analysis, and then click Start Analysis.

  5. Review the report that is displayed in Microsoft Internet Explorer. A copy of this report is also stored in the \DebugDiag\Reports folder.


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

EmanuelHillberg-9113 avatar image
0 Votes"
EmanuelHillberg-9113 answered ·

Hello @SamWu-MSFT

Sorry for not answering.
When using CrashHangAnalysis I dont really get any errors... (I actually think this is an config problem)
Heres a part of the log:


Client Connections



Client connection from 10.105.1.85:61653 to 195.252.7.185:443
Host Header localsite:443
GET request for /videoproxy/streamproxy/10.105.3.195.jpg
HTTP Version HTTP/1.1
SSL Request True
Time alive 00:11:42
QueryString
Request mapped to
HTTP Request State HTR_READING_CLIENT_REQUEST
Native Request State NREQ_STATE_PROCESS
HTTP Headers Accept: image/avif,image/webp,image/apng,image/svg+xml,image/,/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: sv-SE,sv;q=0.9,en-US;q=0.8,en;q=0.7
Host: 127.0.0.1:8081
Max-Forwards: 10
Referer: https://localsite/HTML5/videotest_5_RC1/
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36
sec-ch-ua: "Google Chrome";v="89", "Chromium";v="89", ";Not A Brand";v="99"
sec-ch-ua-mobile: ?0
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: no-cors
Sec-Fetch-Dest: image
X-Original-URL: /videoproxy/streamproxy/10.105.3.195.jpg
X-Forwarded-For: 10.105.1.85:61653
X-ARR-SSL: 4096|256|C=SE, O=XXXXX, CN=SITHS Type 3 CA v1|C=SE, L=XXXXX, O=XXXXXX, CN=localsite, SERIALNUMBER=XXXXXX
X-ARR-LOG-ID: adb967f8-6485-45ab-ad36-593d4b47a6c4





19 connection(s) waiting for the next request.


· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @EmanuelHillberg-9113, Analyzing dump is a huge project, I suggest you use this. support.microsoft.com


0 Votes 0 ·