Поиск причины отправки двух одинаковых запросов из браузера в одно и то же время. ⇐ JAVA
-
Гость
Поиск причины отправки двух одинаковых запросов из браузера в одно и то же время.
I am a newbie, and in my first year of web development job. I need some help.
Recently, I had one incident on production which, in summary, is caused by sending two exactly same POST requests from the browser (MS Edge). It has not happened before, and I cannot reproduce it at all.
The website is for document management system used by business department, so publicly not available and is hosted using AWS Elastic Container Service. The POST request is about changing the work status of a customer (end-user).
At the incident time, I have confirmed through CloudWatch logs that the AWS alarm was activated by the cause of the deadlock in the database. And I found out that the deadlock was caused by two requests trying to update the same table. Then, after checking these requests, it is that the two requests were completely the same and also at the same time, even to milliseconds. Then I found out these two requests also have the same UUID.
In my frontend code, I use Axios HTTP POST request with headers, one of these in which, a unique UUID should be generated for each request. Then, they are logged out in backend (Spring boot) and I can check it in CloudWatch logs.
I have no idea why this happened. Any help will be appreciated.
Here are some screenshots of CloudWatch logs and JS code.
CloudWatch Logs 1
CloudWatch Logs 2
CloudWatch Logs 3
CloudWatch Logs 4
Frontend: JavaScript (Vuejs), Backend: Java (Spring boot), Database: MySQL
I am a newbie, and in my first year of web development job. I need some help.
Recently, I had one incident on production which, in summary, is caused by sending two exactly same POST requests from the browser (MS Edge). It has not happened before, and I cannot reproduce it at all.
The website is for document management system used by business department, so publicly not available and is hosted using AWS Elastic Container Service. The POST request is about changing the work status of a customer (end-user).
At the incident time, I have confirmed through CloudWatch logs that the AWS alarm was activated by the cause of the deadlock in the database. And I found out that the deadlock was caused by two requests trying to update the same table. Then, after checking these requests, it is that the two requests were completely the same and also at the same time, even to milliseconds. Then I found out these two requests also have the same UUID.
In my frontend code, I use Axios HTTP POST request with headers, one of these in which, a unique UUID should be generated for each request. Then, they are logged out in backend (Spring boot) and I can check it in CloudWatch logs.
I have no idea why this happened. Any help will be appreciated.
Here are some screenshots of CloudWatch logs and JS code.
CloudWatch Logs 1
CloudWatch Logs 2
CloudWatch Logs 3
CloudWatch Logs 4
Frontend: JavaScript (Vuejs), Backend: Java (Spring boot), Database: MySQL
Мобильная версия