So, in our development team we have a computer attached to a big screen. This computer is used as a dashboard. It's running Firefox in full-screen 24/7. It's automatically rotating all open tabs every few minutes and it's automatically reloading these tabs. It's not a huge amount of tabs, currently only 3.
The problem is that every now and then a script on one of these tabs goes completely wild and totally freezes the entire computer. So it takes roughly 10 minutes to kill Firefox's process and restart it. This is really annoying. It happens every few days.
The content (applications) which these tabs show are not under our control, we can't change anything about them. Our only option is to adapt to them as best as possible.
What I want to do is to make Firefox, instead of showing the "unresponsive script" prompt, to automatically kill the script, without the need for any interaction from the user. I don't care if the script is killed. It's only used to render the page and the page will be reloaded in a few minutes anyway.
The thing is that this "freezing" usually happens over night, slowly consuming the computer's resources more & more, so when we come in the morning it's really frozen deep. Like, just hitting ctrl+alt+f1 to bring up a terminal and log in takes several minutes.
I've googled my ass off trying to find a solution for this, but so far I didn't find any. I want it to simply work for like a month without the need for any intervention.
You could run with e10s enabled (available in dev edition) and write an addon that instruments tabs and periodically sends messages to them. if they don't respond within a certain timespan you can kill the content process, close all tabs and reopen them.
Since you say it hangs the entire computer you could also limit the memory available to the process and just restart it via a script when it gets killed due to OOM.
Related
Can a old version of jquery (specifically a javascript auto refresh code) crash a website for a single user/local network?
I have a small/simple MySQL database with PHP coded site to insert and retrieve data for internal (non-public) use. It was developed over 4 years ago and still uses jquery-1.2.6.min.js and have had no problems until the past month. Now the site is very random on the operation but only affects the local networks the user I developed it for. It is not a browser crash such as when it goes down the site is unavailable on any computer in the network. Switch to a hotspot or a different building and all works as designed.
I don’t have any reason to think it is website or hosting problem (have talked to hosting support 3 times) but I am trying to cover my bases as the network engineers and ISP tech support are all scratching their heads.
I have used two instances of an auto refresh script 1) to show current time to the user and 2) to refresh the screen with new database content every 15 seconds.
An example on one of the two refresh scripts:
<script type=“text/javascript”>
function load_content({ $(‘#db_content’).load(‘ac_data.php’).hide().show();}
setInterval(‘load_content()’, 15000);
<div id=“db_content”>
<?php require ‘ac_data.php’;?
</div>
Is there any remote chance the code could be to blame since the site has not been updated since original development? I am merely looking for ammo to put the ball back in the network teams court but if there is any chance my code could cause a hang up then I would like to be able to fix it.
We've just upgraded group policies at work because of a big migration project. Nevermind... The thing is, some of our users use this java application, which reads the smart card reader. On new machines it doesn't work in IE, it has to run in firefox. The trouble is, that the first time firefox opens it, it says there's no java. As soon as you reload it, it's fine.
As users are users, they hate the thought of having to reload the page, and it's not very elegant either. As the process of upgrading anything in the company is difficult, and I'm only an entry level desktop support guy, it won't get fixed any time soon.
So I was thinking... is there any way to create a shortcut, that would open the page and then reload it once it finishes loading the first time?
It can be a shortcut to a local html file which then redirects it to the final location...
You can use a vbs:
set WScriptShell = CreateObject("WScript.Shell")
WScriptShell.Run("http://www.facebook.com/")
WScript.Sleep(2000)
WScriptShell.SendKeys "{F5}"
This one opens a page in the browser, waits 2000 ms (probably enough for the page to load) and then sends the "F5" key to the currently active window. This may not be a perfect solution, but you can extend it to match your needs.
Have you tried $( document ).ready() and insert the code in this function? This basically waits your whole page to load and after that executes the code in the function.
I have created a Hotel Management System which is loaded with scripts especially ajax.
The main interface comprises of checked in guests which is being updated/refreshed every 10 seconds.
The reason for that is to inform the user (cashier) that a guest's stay is over.
The problem is, when I have 80 or more rows (checkin), the system slows down. It's consuming a lot of memory.
My resolution was to upgrade the RAM to 6GB and increase the cache size of google chrome to 200MB.
Unfortunately, the problem still exists.
I appreciate your help and time. Thank you.
One more thing, one solution was to restart the computer and it comes back to normal. However, after some time, it will come back. The system is running 24/7 and being restarted every 12 hours.
Here's an image of the user interface.
http://s12.postimg.org/qoc6t75q5/Capture.png
This is a weird scenario I just experienced and I am not sure how to phrase the question.
It may be best to describe my application and what it does 1st.
I have an IP camera connected to my router.
I use a C# VLC wrapper to get 10 frames a second using a RTSP protocol.
I then upload to my web server using a [web method] these seperate jpegs to my server.
Then via browser using a javascript timer set to 100ms it renders the image into a HTML image control by calling an ashx page repteadly.
Now this has worked for a few days OK.
Now this is what I have experienced in the last 48hrs.
The images coming from the IP Camera was jumpy. That is to say sometimes the images flow in a timely order and sometimes it will slow down, stop and speed up again to 'catch up'.
I noticed when viewing via a web browser client on another PC on my network that the javascript timer calls were slow and sometimes stopped for periods of time. I used Google Chrome to view how often the ashx url was being called.
I closed down my own applications. Rebooted all my PCs and started VLC application without using the wrapper. Again, the flow was 'jumpy'. So the conclusion there was that it was not my application.
For some reason I decided to log into my router (192.168.0.1).
Page was not found.
In fact I had to do a complete restart of my router to be able to access my router 'page'.
As soon as I did this everything worked OK again.
So, the 2 questions I have is (1) why could I not access my router through that IP address and (2). Why was my javascript timer crashing to a stand-still?
Like I said this is a weird scenario and I would not blame anyone for wanting to close or vote down this question.
But on the off-chance this is a known thing I would like to be educated.
Thanks
Please pardon my ignorance, relatively new to working with XULRunner.
I'm attempting to debug an issue with a XULRunner application and have hit a wall. We're using the app to load certain websites and retrieve layout information. After the scrape is done, we close the tab that the page has been loaded in. Occasionally, the number of tabs will grow continuously until memory is exhausted. Our theory is that the browser is hitting an unresponsive script which blocks execution indefinitely.
Is there a preference that can be set or something that will automatically kill tabs that hit an unresponsive script?
I've Googled around and the only thing I can find is
dom.max_script_run_time
which only allows you to specify how long to wait before popping up the "Unresponsive Script" dialog, but doesn't actually kill the tab.
I'm not totally sure I understand, but here are my thoughts: You could run the script in a separate process, and then kill that process if it takes too long. Or you could have the script continuously check out long it's been running and then kill itself if it takes too long. Other than that I don't know what you could do.