Page 1 of 2

Httpclient.Timeout after 100 second

Posted: Tue Dec 09, 2025 12:23 pm
by ShakeebAhmed
Hello,

We are getting Httpclient.Timeout error after 100 second while loading large dataset. How to increase that httpclient timeout? Below are the details what we are using.

Version - 2025.4.3
Stimulsoft.Data.GraphQL - 2025.4.3 --> Seems like problem is somewhere here as we uses graphql query and that get's timeout.
Tech - .Net core, Angular

We are trying to export the report which uses datasource of graphql and it does works well with 10K records but when I change it to 100K, it throws the timeout error in our custom export feature "report.Render(false)". Tried to extend timeout of viewer but it didn't works.

Thanks.

Re: Httpclient.Timeout after 100 second

Posted: Thu Dec 11, 2025 11:41 am
by Vadim
Hello

For web requests please use

Code: Select all

StiAngularViewerOptions options.Server.RequestTimeout
(seconds)

Re: Httpclient.Timeout after 100 second

Posted: Tue Dec 16, 2025 3:09 pm
by ShakeebAhmed
Hello Vadim,

Sorry for being late on the response but unfortunately it didn't works after updating RequestTimout as it still get expired after 100 seconds.

What we wanted to achieve here is:
1. Our report uses graphQL as an datasource, data may get's vary depending on the query hence we want the report to wait till they receive data to fill show report but it does not wait and throws timeout error.
2. To avoid this, what we did was try to export the pdf, excel, html of that report instead of viewer to make it easy for processing but we did notice issues in that too. Like if you below code where we are trying to setup data sources for report so that we can handle timeout if api requires more time to return the result set and it does works too but when we did set that result in the report data it still hit the data source to get it when we did

Code: Select all

report.Render(false);
Not sure what we are missing here.

Getting Report Object ready:

Code: Select all

var report = new StiReport();
var data = _context.GetReportById(id);
report.LoadPackedReportFromString(data.PacakedDataString);
Fetching manual data and setting up datasource of report:

Code: Select all

var gql = report.Dictionary.DataSources.OfType<StiGraphQLSource>().First();
if (gql != null)
{
    var gqlQuery = ((Stimulsoft.Report.Dictionary.StiGraphQLDatabase)gql.Dictionary.Databases.Items[0]).Query;
    var gqlUrl = ((Stimulsoft.Report.Dictionary.StiGraphQLDatabase)gql.Dictionary.Databases.Items[0]).EndPoint;

    // Execute GraphQL manually
    var result = await ExecuteGraphQL(
        endpoint: gqlUrl,
        query: gqlQuery,
        variables: null,
        timeoutSeconds: 1200
    );

    
    //report.Dictionary.DataSources.Remove(gql);
    //var gqlDb = report.Dictionary.Databases.OfType<StiGraphQLDatabase>().FirstOrDefault();
    //if (gqlDb != null)
    //    report.Dictionary.Databases.Remove(gqlDb);

    var items = (JArray)result[gql.Name]["items"]; // depends on your API
    var table = ToDataTable(items);
    //report.RegBusinessObject("Connection", result);
    //report.RegBusinessObject($"{gql.Name}_Items", items);
    report.RegData($"{gql.Name}_Items", table);
    //report.Dictionary.Synchronize();
}
Export pdf code:

Code: Select all

var service = new StiPdfExportService();
service.ExportPdf(report, stream, settings);
Notes:
- In report.RegData("NAME",table); NAME is the same data source name in designer that we have.
- I did tried to remove Datasource from dictionary and it returns blank report
- Did tried Dictionary synchronize too but still it didn't works.

The issue we are facing is even if we are setting up datasouce to report it still try to fetch the data again when we do

Code: Select all

report.Render(false);
. How can we stop that and also is it the right way of setting up datasource? (Ref.) Attached picture of report designer to just let you know what we did so far.

Thanks. Sorry for long message but trying to explain all key things so that you can help us.Image

Re: Httpclient.Timeout after 100 second

Posted: Wed Dec 17, 2025 8:20 am
by Vadim
Hello

Maybe you should extend Query Timeout for database?
2.png
2.png (19.35 KiB) Viewed 4031 times

Re: Httpclient.Timeout after 100 second

Posted: Thu Dec 18, 2025 11:12 am
by ShakeebAhmed
Hello,

We are not using MySQL as we do uses GraphQL (we manage connection timeout of DB request and stuff). We need to understand how do I stop report data fetching mechanism and use my data that I assign to it as it is currently calling report data while we are doing report.Render().

Thanks.

Re: Httpclient.Timeout after 100 second

Posted: Sun Dec 21, 2025 6:50 am
by ShakeebAhmed
Kind Reminder

Re: Httpclient.Timeout after 100 second

Posted: Mon Dec 22, 2025 6:05 am
by ShakeebAhmed
Hello Vadim,

Is there any updates on this?

Thanks.

Re: Httpclient.Timeout after 100 second

Posted: Mon Dec 22, 2025 7:29 am
by Vadim
Hello

You can't stop data fetching during report generation.
Can you send us full error stack trace?

Re: Httpclient.Timeout after 100 second

Posted: Mon Dec 22, 2025 8:40 am
by ShakeebAhmed
Hello,

We are getting "Timeout error after 100 sec" if report data fetching exceeded the time limit. As we are using "report.Render(false)" method to render report and then export it, 99% times our dataset is in large scale and would take approx. 5-10 min to load them. Hence we tried to load them by ourself so that we can assign it to report dictionary to use it instead of re-loading again during rendering. Is there any way to extend time in graphql request if we can't stop report to fetching data calls?

Thanks.

Re: Httpclient.Timeout after 100 second

Posted: Tue Dec 23, 2025 8:54 am
by Lech Kulikowski
Hello,

There are no timeout settings for GraphQL in the designer. Try to check the IIS timeout settings.

Thank you.