Hi guys,
Just upgraded my embedded pfsense to 2.3.
I have problems getting to the box (web or ssh) it just time outs.
On the web I sometime I get Nginx 504, sometime, just nothing.
Eventually I got logged in, try to check what's going on.
I have open Diagnostics->System Activity page, and start monitoring the
network traffic.
There is Java Script that updates the page content every 2.5, but actual
response in my case was more then 15 sec.
So I ended up with +20 pending requests to /diag_system_activity.php.
I don't think that setInterval is a good option here. Especially when
you don't know how long it will take for the request to complete.
My suggestion is to use setTimeout like this:
<script type="text/javascript">
//<![CDATA[
function getcpuactivity() {
$.ajax(
'/diag_system_activity.php',
{
method: 'post',
data: {
getactivity: 'yes'
},
dataType: "html",
success: function (data) {
$('#xhrOutput').html(data);
+ setTimeout('getcpuactivity()', 2500);
},
}
);
}
events.push(function() {
- setInterval('getcpuactivity()', 2500);
+ setTimeout('getcpuactivity()', 2500);
getcpuactivity();
});
//]]>
</script>
Regards,
Rosen
_______________________________________________
pfSense mailing list
https://lists.pfsense.org/mailman/listinfo/list
Support the project with Gold! https://pfsense.org/gold