• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /var/www/html/cnasolution/site/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/site/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/site/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Browser sends 20-30 duplicate requests per second

I have a page /home.jsp which has a simple JavaScript code (activate by clicking on a button)

window.top.location='/list.jsp&time_'+Date.now();

This code 99.99% works fine and opens the desired page. Quite rare, the server begins receiving 20-30 requests/second with the same "time" value from same user. And these duplicates may come non-stop for several minutes

The only one remain suspect is HTTP Request Automatic Retries from browser.

Additional details:

  1. Each of duplicate request has HTTP Request Referer Header = /home.jsp There is no other code in home.jsp which generates this link.
  2. The issue happens on different Browsers (IE, Chrome, Edge, etc.) and OS (Windows, MacOS, etc.)
  3. The issue happen for a random user. For 6 month I did not find any correlation between the issue and User/IP/etc. And... I have too many users, so there is no chance to predict where it happens next and ask to capture anything on user side.
  4. It is not a DDOS or intentional User actions. When I contacted such user (I have trusty relations with Users) - the user responded something like "page was just slow, I finally had to re-login/re-open browser/etc."
  5. The issue also happens for many different pages in my app. Including POST requests.
  6. The issue is not related to any browser plugin (I added code which captured list of browser plugins and cannot find any common plugin) and 3d party JavaScript (same, I track list of loaded JS and cannot find any correlation)
  7. The issue exists for at least 4 years for my app (initially I thought it is a JS bug somewhere, and just recently figure out that is has such common scenario)
  8. I cannot reproduce the issue in local or QA environment. It happens only in production for real users
  9. Many TCP Dumps proven that all requests came from outside (no duplication inside my network). But I noticed excessive % of cancelled TCP packages during the issue.
  10. Different browser tab for the same user behaves normally during the issue and not sending duplicates. Different users from the same IP behave normally during the issue.

Googling brough only this post https://blogs.oracle.com/ravello/beware-http-requests-automatic-retries which looks relevant to my issue.

Could you please advise how to further troubleshoot and fix the issue?

Download script demo [LINK] [Origin]
Download script demo [LINK 2] [Onedrive] Download script demo [LINK 2] [Google drive]