40
Views
8
Comments
REST API timeout Issue

Hi All,


I got this issue when request to REST API. Seem like it's got timeout:

SourceREST (Expose)

MessageThe operation was canceled.

Environment InformationeSpaceVer: Id=185795, PubId=0, CompiledWith=11.18.1.37828RequestUrl:  (Method: POST)AppDomain: xxx/LM/W3SVC/1/ROOT/SAP_UAR-48-133379531315128050FilePath: xxx\ClientIp: 10.13.54.204 X-Forwarded-For: 57.140.24.32Locale: en-USDateFormat: yyyy-MM-ddPID: 10136 ('w3wp', Started='8/31/2023 10:21:10 AM', Priv=1421Mb, Virt=2116382Mb)TID: 104Thread Name:.NET: 4.0.30319.42000

StackThe operation was canceled.   at System.Threading.CancellationToken.ThrowOperationCanceledException()   at System.Net.Http.HttpContentExtensions.d__17`1.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)   at System.Web.Http.ModelBinding.FormatterParameterBinding.d__18.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Web.Http.Controllers.HttpActionBinding.d__12.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)   at System.Web.Http.Controllers.ActionFilterResult.d__5.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)   at System.Web.Http.Filters.AuthorizationFilterAttribute.d__3.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)   at System.Web.Http.Controllers.ExceptionFilterResult.d__6.MoveNext()

If you can recreate this call I would advise to increase the logging level of this API and then repeat the request. It might give you some more information as to what is going wrong. With this trace nothing really pops out to me at the moment.

To increase the logging level you can go to Service Center, then look up the module via the 'Factory' tab, click on the module and then go to the 'Integrations' tab, click on the specific post this trace is from and increase the logging level to full. Then try again and see if you get some more information

Hi,

I already set logging level to full but only throw that error, do you have any ideas to trace?

Hi Cuong,

If that is the full logging level I'm afraid I don't have another suggestion. You could add some manual logging in the OnBeforeRequest but that does not give you insight in the problem, just in the request itself..

Hi Orizande,

Thank you for your help, let me try add log for investigating.

Champion

Hi @Cuong Su 

If you did not find erro cause after setting log level to full Then try to run same api in postman and check it's working there or not 

It might be possible you can get some information there.

Best

Arun

Hi Arun,

I think the problem might be because I make several request API in loop. 

When I try to request in postman then it's work fine.

Champion

Ok, then I suggest to use custom logging inside the loop after every API so you can identify which api throwing error and what is the cause.

Regards

Arun

Ok, let me try to do that, hope can find what is the cause.

Thank you!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.