That ticket is mine also. I already increased timeout of YARP and as I said above, in old version it still works fine, but new version does not.
"gsib-report-service-cluster": {
"HttpRequest": {
"ActivityTimeout": "01:00:00"
},
"Destinations": {
"destination1": {
"Address": "https://localhost:7019"
}
}
},
Hi,
I used swagger to directly call the endpoint and succeeded in about 2mins.
Also in your logs, it seems client cancels request in 10 seconds and resends it again and again
Yes, you are right. I also saw it, but don't know why. I tried to increase all types of timeout as code above but not luck.
Hi,
Thank for your suggestion.
Is there any way to change the name of javascript function when it is dynamically generated at runtime.
For example: In report module I have a ReportItemAppService in namespace MZH.MHIBS.Report with GetList method. I add this module into AMLReportService after running, the javascript code will be generated like this:
abp.utils.createNamespace(window, 'mZH.mHIBS.report.reportItems.reportItem');
mZH.mHIBS.report.reportItems.reportItem.getList = function(options, permission, ajaxParams) {
return abp.ajax($.extend(true, {
url: abp.appPath + 'api/aml-report-service/report-item' + abp.utils.buildQueryString(...) + '',
type: 'GET'
}, ajaxParams));
};
Now, if I use this module in CICReportService, the javascript code will be generated the same. I can change the API api/aml-report-service/report-item and api/cic-report-service/report-item but the name of javascript function still the same. How to change it.
Hi,
I've sent the log. Please help to fix this issue.
Hi,
Are you there?
Hi,
Any update on this issue?
Hi,
Can you share your email. I will send you full log.
Hi,
Thanks for your answer but you misunderstand my question. I have a ReportModule which have following tables: ReportItem, ReportType, ReportStructure and each table has a screen to maintain data. These screens use example controller above with the static Route attribute at the top of the controller [Route("api/report/report-item")].
Now I have 2 services: ServiceA and ServiceB use this module and different databases (ServiceAData, ServiceBData). These services will have the same 3 above tables in each database. I separated this point OK.
But my question is about the screens of the module, because 2 services use the same screens to maintain data just save into different databases. How to separated the route attribute of the controller for each service?
For example, when adding this module to ServiceA the route attribute will transform to [Route("api/service-a/report/report-item")] and [Route("api/service-b/report/report-item")] for ServiceB.
Because if I keep the route the same, I can't configure route in YARP. It will always point to one controller and therefore save data into one database.
I get this error after upgrade microservice template from v7.3.0 to v9.1.0. Old version still works fine.
[web_80132ba5-d]: [10:43:56 ERR] ---------- RemoteServiceErrorInfo ----------
[web_80132ba5-d]: {
[web_80132ba5-d]: "code": null,
[web_80132ba5-d]: "message": "An error occurred during the ABP remote HTTP request. (The operation didn't complete within the allowed timeout of '00:00:30'.) See the inner exception for details.",
[web_80132ba5-d]: "details": null,
[web_80132ba5-d]: "data": null,
[web_80132ba5-d]: "validationErrors": null
[web_80132ba5-d]: }
[web_80132ba5-d]:
[web_80132ba5-d]: [10:43:56 ERR] An error occurred during the ABP remote HTTP request. (The operation didn't complete within the allowed timeout of '00:00:30'.) See the inner exception for details.
[web_80132ba5-d]: Volo.Abp.Http.Client.AbpRemoteCallException: An error occurred during the ABP remote HTTP request. (The operation didn't complete within the allowed timeout of '00:00:30'.) See the inner exception for details.
[web_80132ba5-d]: ---> Polly.Timeout.TimeoutRejectedException: The operation didn't complete within the allowed timeout of '00:00:30'.
[web_80132ba5-d]: ---> System.Threading.Tasks.TaskCanceledException: The operation was canceled.
[web_80132ba5-d]: ---> System.IO.IOException: Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request..
[web_80132ba5-d]: ---> System.Net.Sockets.SocketException (995): The I/O operation has been aborted because of either a thread exit or an application request.
[web_80132ba5-d]: --- End of inner exception stack trace ---
I tried to increase the timeout like this, but the error still occur.
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpHttpClientBuilderOptions>(options =>
{
options.ProxyClientActions.Add((remoteServiceName, clientBuilder, client) =>
{
client.Timeout = TimeSpan.FromMinutes(60);
});
options.ProxyClientBuildActions.Add((remoteServiceName, clientBuilder) =>
{
clientBuilder.AddPolicyHandler(Policy.TimeoutAsync<HttpResponseMessage>(TimeSpan.FromMinutes(60)));
clientBuilder.AddResilienceHandler("MHIBS", builder =>
{
builder.AddTimeout(TimeSpan.FromMinutes(60));
});
clientBuilder.AddStandardResilienceHandler(opts =>
{
opts.TotalRequestTimeout.Timeout = TimeSpan.FromMinutes(60);
opts.AttemptTimeout.Timeout = TimeSpan.FromMinutes(60);
opts.CircuitBreaker.SamplingDuration = TimeSpan.FromMinutes(120);
});
});
});
}
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="9.0.3" /> <PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="9.4.0" />
Please help
I've created a report module and need to use this module in multiple microservices. In this module, I have some pages with following controllers
namespace MZH.MHIBS.Report.Controllers
{
[RemoteService(Name = ReportRemoteServiceConsts.RemoteServiceName)]
[Area(ReportRemoteServiceConsts.ModuleName)]
[Route("api/report/report-item")]
public class ReportItemController : ReportController, IReportItemAppService
{
protected IReportItemAppService ReportItemAppService { get; }
public ReportItemController(IReportItemAppService reportItemAppService)
{
ReportItemAppService = reportItemAppService;
}
[HttpPost]
[Route("batch-update")]
public Task BatchUpdateAsync(List<DXBatchUpdate> changes)
{
return ReportItemAppService.BatchUpdateAsync(changes);
}
[HttpGet]
public Task<LoadResult> GetListAsync(DataSourceLoadOptionsCustomized options)
{
return ReportItemAppService.GetListAsync(options);
}
}
}
Each microservice use different database. When using this module, each microservice will have the same tables. But I don't know how to separate the route of controllers for each microservice. Please help.