If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

on long lasting ajax calls a http rst may occur after ~30 seconds

RESOLVED DUPLICATE of bug 1235509

Status

()

Core
Networking: HTTP
--
major
RESOLVED DUPLICATE of bug 1235509
2 years ago
2 years ago

People

(Reporter: carlo, Unassigned)

Tracking

43 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
Build ID: 20141113143407

Steps to reproduce:

- Using linux mint (1.7)
- Using firefox 43.0
- Do an ajax call to a php scripts that sleep e.g. 180 seconds

Note that the problem starts with firefox 43.0, results for other browsers:
Firefox 43.0 on Mint NOT ok
Firefox 43.0.1 on Mint NOT ok
Firefox 43.0.4 on Mint NOT ok
Firefox 44.0b9 on Mint NOT ok
Firefox 39.0 on Mint OK
Firefox 43.0.1 on windows OK, calling same script on mint machine
Apera 12.16 on Mint OK
Chromium 47.0.2526.73 on Mint OK

As i can not include files i print them here:
index.php:
<!DOCTYPE html>
<html lang="en">
<head>
    <SCRIPT language=Javascript src="js/timouttest.js" type="text/javascript"></SCRIPT>
    <SCRIPT language=Javascript src="js/jquery.js" type="text/javascript"></SCRIPT>
</head>
<body  onload="onPageLoaded()">
<input size="60" id="result">
<input type="button" id="TestButton" value="Test">
</body>
</html>

sleep.php:
<?php
sleep(180);
header("HTTP/1.0 200 OK");
?>

timouttest.js:
function onPageLoaded()
{
    var testButton=$('#TestButton');
    testButton.bind('click',    onClickTestButton);
    testButton.attr("disabled", false)
}


function onClickTestButton()
{
    $('#result').val("Running");
    var url="sleep.php"
    var timeout=190000; // must result in OK, 170000 must report a timeout
    $.ajax({

        url:url,
        dataType: "text",
        timeout: timeout
    })
    .done(function() {
        $('#result').val("OK");
    })
    .fail(function(jqXHR, textStatus, errorThrown) {
            var statusMsg = "";
            if( textStatus != null) {
                statusMsg = "textStatus: " + textStatus;
            }
            if( errorThrown != null) {
                if(statusMsg.length == 0) {
                    statusMsg = "errorThrown: " + errorThrown;
                }
                else {
                    statusMsg += ", errorThrown: " + errorThrown;
                }

            }
            $('#result').val(statusMsg);
        }
    );
}

And you need jquery, we use v1.7.2









Actual results:

- The js script stops, neither fail or done is returned
- Wireshark reports an http rst


Expected results:

- The js script should report done or if the timeout is lower then the sleep a timeout.
(Reporter)

Updated

2 years ago
Severity: normal → major
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Comment 1

2 years ago
Could you provide a live testcase, please?
Flags: needinfo?(carlo.koopmans)

Updated

2 years ago
Component: Untriaged → Networking: HTTP
Product: Firefox → Core
(Reporter)

Comment 2

2 years ago
If you want to test this, you must run firefox on a linux mint machine (probably an ubuntu will do as well). It does not matter where you put the scripts, either in the webroot of the mint machine or on another machine (this was also tested, same results, not ok). Our mint machines are not on line.
Flags: needinfo?(carlo.koopmans)
Thank you for reporting this.

Can you try to set pref network.notify.changed to false. his is probably bug 1234548 or 1235509. This bugs are only on Linux.

In nightly 46 this is fixed and in aurora and beta this pref is disabled.
Flags: needinfo?(carlo.koopmans)
(Reporter)

Comment 4

2 years ago
Set the pref network.notify.changed to false 43.0. This solves the problem!
Flags: needinfo?(carlo.koopmans)
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1235509
You need to log in before you can comment on or make changes to this bug.