添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

We are getting a 504 gateway time out for this ASP.NET Core 6 Web API while doing performance test. This is the API:

public async Task<IActionResult> GetGUID(GUIDModel model)
    String result = await BAL.GetGUID(model);
    return Ok(new { guid = result });

Business layer

public async Task<string> GetGUID(GUIDModel model)
    string result = await  DAL.GetGUID(model);
    return result;

So, this model which contains some of the parameter against which GUID will be generated and stored in DB And generated GUID will be return to the Web API.

However, when we are doing performance test we are getting 504 gateway time out for almost 50% requests are made.

For example if we are passing 1000 concurrent request then 500 request have this error.

Our API's are hosted on EC2 instances (c6i.xlarge) with 8gb, 4vCPUS are configured.

This is the one of the simplest of API we have which do not have any kind of complex transaction. Still, we are not sure why we are getting such error.

Any help on this appreciated.

I am assuming this is running out of IIS on the EC2? Maybe something with that is off. If you are getting exactly 500 requests failing out of 1000, I am wondering if you have some concurrency limit in place without knowing. – Timothy G. Jun 29 at 18:40 Yes, its on IIS server. So, where we need to check concurrency limit to solve this issue? – XamDev Jun 29 at 18:44 In the code you provided, nothing seems abnormal with it. So I suspect something around configuration or infrastructure is off yes. – Timothy G. Jun 29 at 18:59

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.