Long-running requests cause an internal server error

Issue #786 new
David Platten created an issue

OpenREM version 0.10.0b2; probably also affects previous versions.

Plotting a chart of median DLP per requested procedure name with histograms switched on for a broad range of request types over an extended study date range causes an internal server error on my live and test system. This may be linked to Django’s default TIMEOUT setting of 300s:

https://docs.djangoproject.com/en/1.8/ref/settings/#timeout

https://docs.djangoproject.com/en/2.2/ref/settings/#timeout

Setting the TIMEOUT to None in local_settings.py fixed the issue on my test system which uses Pycharm’s in-build web server. However, the issue persists with my live system which uses Microsoft’s IIS web server.

I thought that my live system’s issue may be linked to the webserver timeout setting. In Microsoft IIS this can be increased from the 120s default by using these instructions: https://docs.microsoft.com/en-us/iis/configuration/system.applicationhost/sites/sitedefaults/limits

However, this has not sorted out my live system. It may be related to a proxy timeout that I have no control over.

Comments (6)

  1. David Platten reporter

    The TIMEOUT setting was a red herring. It makes no difference to my test system: it works fine as-is.

    On my live system I have increased the timeouts in the “FastCGI Settings” section of the IIS configuration for my OpenREM site to see if that helps.

  2. David Platten reporter

    Increasing the “FastCGI Settings” timeouts has fixed the problem on my live system.

  3. David Platten reporter

    Yes. There is an “Activity Timeout” under “Process Model”. There’s also an “Idle Timeout” and “Request Timeout” under “Advanced Settings”. I have made all three of these 600 s, but not sure if that’s overkill.

  4. David Platten reporter

    Yes, I think it would be a good idea. It may have to be a bit general - “If you encounter issues with long-running requests failing then try…”

  5. Log in to comment