Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Export data from EPi causes server error

Vote:
 

When exporting data from EPi we get a "website not available" and the actual downloadable file as 0 bytes (sorry, the image is in swedish).

The site is quite large with a lot of content and related images etc.

I've tried every setting I can think of - this issue doesn't seem to exist locally when running F5.

How ever we need it on the production servers in Azure. I'm guessing there is a timeout issue somewhere?

private const long MaxBodySize = long.MaxValue;

// If using Kestrel:
services.Configure<KestrelServerOptions>(options =>
{
	options.Limits.MaxRequestBodySize = maxBodySize;
	options.Limits.KeepAliveTimeout = TimeSpan.FromMinutes(60);
	options.Limits.RequestHeadersTimeout = TimeSpan.FromMinutes(60);
});

// If using IIS:
services.Configure<IISServerOptions>(options =>
{
	options.MaxRequestBodyBufferSize = maxBodySize;
	options.MaxRequestBodySize = maxBodySize;
});

services.Configure<FormOptions>(options =>
{
	options.ValueLengthLimit = maxBodySize; // Limit on individual form values
	options.MultipartBodyLengthLimit = maxBodySize; // Limit on form body size
	options.MultipartHeadersLengthLimit = maxBodySize; // Limit on form header size
});

services.Configure<UploadOptions>(options => options.FileSizeLimit = maxBodySize);

// app
app.UseWhen(context => context.Request.IsEPiUiPath(), builder =>
{
	var maxSizeFeature = builder.ServerFeatures.Get<IHttpMaxRequestBodySizeFeature>();
	if (maxSizeFeature is null || maxSizeFeature.IsReadOnly)
	{
		return;
	}
	maxSizeFeature.MaxRequestBodySize = maxBodySize;
});

// Web.config
<aspNetCore processPath="dotnet" arguments=".\xxx.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" requestTimeout="02:00:00" />
#316341
Edited, Jan 29, 2024 6:16
Vote:
 

Hi Carl S,

Azure has a hard limit of 240 seconds for requests - anything longer will timeout.

See link below, section 'Why does my request time out after 230 seconds?'
https://learn.microsoft.com/en-us/troubleshoot/azure/app-service/web-apps-performance-faqs#why-does-my-request-time-out-after-230-seconds

#316343
Jan 29, 2024 11:36
Vote:
 

Hi. Karol Berezicki.

We don't use Azure Load Balancer explicitly, but I'm guessing instances of the same web app use it internally some how.

Thanks

#316344
Jan 29, 2024 12:41
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.