Поиск причины отправки двух одинаковых запросов из браузера в одно и то же время.JAVA

Программисты 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
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «JAVA»