Quantcast
Channel: FastCGI Module
Viewing all 205 articles
Browse latest View live

download of larger static file stops using wfastcgi and Flask on IIS10 and Windows Server 2019

$
0
0

After a day of trying all kinds of hints from the web I am out of ideas with this one: I have the simplest Flask app serving a static 600MB file to download. After about 1,5-2 minutes or about 80-280MB (so not at all after the same amount of bytes or seconds) the download stops and the client gets a HTTP 500 (according to the IIS log).

  • If I serve the same file from a static website (no python or flask at all involved) on that IIS, the download finishes.
  • Everything runs fine if I start flask on the same machine as a local server (and access it via localhost, of course.).
  • If I serve the same app on a second server running Windows Server 2012R2 and IIS 8.5, it works fine.
  • The wfastcgi log does not show any errors and flask does not throw any Exceptions.

The code is rather trivial:

__init_.py:

def create_app():
  filename = inspect.getframeinfo(inspect.currentframe()).filename
  root_path = os.path.dirname(os.path.abspath(filename))
  app = Flask(__name__, root_path=root_path)
  return app

app = create_app()

@app.route("/")
  def index():
  return render_template('index.html')

index.html under templates:

<html><body><a href="{{url_for("static", filename="bigfile.bin")}}"> Please download </a></body></html>
  • If have also tried to use flask's send_from_directory explicitly -> same difference.
  • I have set all timeouts I know of up to at least 5 minutes: Timeouts for the ApplicationPool, the connection timeout of the site and even the connection timeout under system.applicationHost/webLimits.There I have changed minBytesPerSecond to 0, as well.
  • The Webserver is an IIS 10 on Windows Server 2019 with wfastcgi installed.
    The issue occurs on HTTPS AND on HTTP. For https: Switching HTTP/2 on or off has not had an effect.
    I have used current Firefox, Chrome and iOS Safari on the client site, makes no difference.
  • Versions are:
    Python 3.6.4 (I have also tried 3.7.x)
    Flask 1.1.1
    Werkzeug 1.0.1
    wfastcgi 3.0.0.
    These are exactly the same versions as those on the older IIS 8.5 where it works.

Any suggestions even as to how to debug where and why exactly the download fails (I am not even sure if flask is still involved at this point) would be highly appreciated. Neither the IIS logs nor the wfastcgi log give me any idea anymore.


URL rewrite with IIS and FastCGI

$
0
0

We want to address a Python application (MapProxy) in an IIS 8.5 using FastCGI.On the Python page, wfastcgi.py is used.
This scenario works in principle, even with its own "MapProxy" site in IIS.

Our problem is that in this constellation we can no longer use URL rewrite to mask the calls to the MapProxy site.This is set on the "Default Web Site" and works with us only with "Redirect"."Rewrite" results in 404, although the URL pattern is correctly recognized and set.

wincache on iss

$
0
0

Hello we are looking to install wincache on our servers but we are finding some conflicting information, I am looking for a version that runs on php 7.2 or above.

in the offical documentation here from https://docs.microsoft.com/en-us/iis/application-frameworks/install-and-configure-php-on-iis/use-the-windows-cache-extension-for-php microsoft the latest version supported is 5.3?

the latest download here is however 7.1? https://www.iis.net/downloads/microsoft/wincache-extension

And over here the latest version is 7.2 https://sourceforge.net/projects/wincache/ although this is not a microsoft website would anyone be able to clearify if this is extension is still supported for php and if so what the latest version of php is that will work with this extension?

The element configuration levels

$
0
0

The documentation states:


You can configure the <fastCgi> element at the server level in the ApplicationHost.config file or at the site level, at the application level, or at the directory level in a Web.config file.


Is it possible to configure the FastCGI application inside the web.config file after changing theallowDefinition attribute of the fastCgi section fromAppHostOnly to Everywhere and unlocking thefastCgi section?

HTTP Error 500.0 - Internal Server Error - The FastCGI process exited unexpectedly

$
0
0

Hi,

After switching a php app from php7.3 to php7.4 on Azure App Service I get the following error message:

HTTP Error 500.0 - Internal Server Error

D:\Program Files (x86)\PHP\v7.4\php-cgi.exe - The FastCGI process exited unexpectedly

Most likely causes:

  • IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
  • IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
  • IIS was not able to process configuration for the Web site or application.
  • The authenticated user does not have permission to use this DLL.
  • The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.

Detailed Error Information:

Module   FastCgiModule
Notification   ExecuteRequestHandler
Handler   PHP74x86_via_FastCGI
Error Code   0xc0000005

Requested URL   https://example:80/index.php/
Physical Path   D:\home\site\wwwroot\index.php\
Logon Method   Anonymous
Logon User   Anonymous

More Information:

This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error.

View more information »

Microsoft Knowledge Base Articles:

  • 294807

----- end of error message

Stack settings:
Stack: PHP

PHP Version: 7.4

Platform: 32 Bit

Managed Pipeline Version:  Integrated

Server: Microsoft-IIS/10.0

Viewing all 205 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>