Reputation:
In my home/office it worked fine.
But yesterday i went to setup this to a customer location where they have dedicated internet. But in there network all my packets are getting lost of delayed and completely the whole thing not working as it was working in my home/office network to the cloud.
I get often Google Chrome > network > Timing > Connection setup = Stalled 14.89s and red line of the URL
How can i fix it please? I spend several hours with there networking guys but they think its my code causing it? i am very confused now.
var maincrawl_timer = null;
function crawl() {
maincrawl_timer = setTimeout(function() {
var s1 = $.get(submit_url + '/inbox', {
action: 'spinbox',
ousername: main_username,
status: 'offline'
}, function(msg) {
for (drawSixRowOnly in msg.db) {}
}, 'json');
s1.always(function() {
console.log('>>> crawl started. Are you sure its not causing Stalled??????????????????');
crawl();
});
}, 3000);
}
// Boot once
crawl();
// Button used - to receive request
function ackowledge(input1, input2) {
var chk = input2 + '_' + input1;
if (search_row(chk) == chk) {
error_show('Accepted by someone else.');
return false;
}
$('#form1_show').show();
$('#form1_title').html(input2);
$.post(submit_url + '/spack', {
action: 'spack',
ousername: main_username,
id: input1,
kiosk: input2
}, function(msg) {
if (msg.result == 'ok') {
spformid = msg.spformid; // selected: ACknowledge id
$('#form1_body').html(msg.form);
} else {
$('#form1_body').html('Failed');
}
}, 'json');
}
Upvotes: 7
Views: 3761
Reputation: 151
I don't see anything in your code that would be causing stalled HTTP traffic. What do the HTTP request/response headers look like in your Chrome dev tools when you try to access the server? Are you getting 403 errors? Try SSHing into the server from your client or ask the network engineers to curl on the server with your client URL. If all this appears to show that the server will accept packets from the client, then perhaps you are sending your packets to the incorrect port or you are not authenticated properly. In the case that you are not authenticating properly, learn about the server's security requirements. You may have to implement Oauth/cookies/Access-Control-Allow-Origin headers to authenticate properly.
Upvotes: 1