Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

A self written Websocket Page keeps crashing after a few hours.

  • 5
  • 1 nwere nsogbu anwere nsogbu a
  • 1 view
  • Nzaghachi ikpeazụ nke cor-el

more options

I've written a Wallboard Application that uses a permanent Websocket connection to retrieve new data from the server (the content get's pushed out to the monitors). The Websocket Server is a .Net Application that runs a HTTP Server that accepts normal HTTP request as well as Websocket. The client (Wallboard Frontend) uses Firefox to connect to the Server. Right now I use 4 firefox instances! (different profiles) to show on 4 different screens. The Application is designed to be administrated from the management interface (part of the Backend) only, so that there is absolutely no interaction with the firefox windows necessary. The Frontend is running 24/7. The Frontend uses JS to connect to the Websocket Server and reconnects automatically in case the connection drops or any other error occurs. The body-tag is empty in the beginning. After the WS Connection is established I use JQuery to change the body's innerHTML. Many tags have GUIDs as id-attribute. I use them to update the conectent. That means the server sends new HTML content and the client uses JQuery the change the innerHTML of for example. This works perfectly fine for all configurations except for one. I usually update content every 60s. The only difference to the other screens is that I use Google Maps on this one. The content that get's replaced by JQuery looks like this:

 <script>

try { var mapOptions = {

   zoom: 5,
   center: new google.maps.LatLng(66.14352, 18.00382),
   disableDefaultUI: true,
   mapTypeId: google.maps.MapTypeId.ROADMAP
 };
 var map = new google.maps.Map(document.getElementById('map-canvas'),
     mapOptions);

setMarkers(map); } catch(err) { } </script>

The script reference to the Google Maps API is permanently located in the header. This is the code I use to replace content: $('#' + n[1]).empty(); $('#' + n[1]).html(n[2]); //n[2] contains the code above

This works perfectly fine for a few hours. Then Firefox crashes. BTW the same thing happens with Chrome: 'Aw snap'. I would expect a Javascript-Error but not Firefox to crash. Safe-Mode doesn't help, disable JS would make no sense. It doesnt matter which profile I use.

When I set the Update Interval to 5 minutes instead of 60 seconds it works longer but it still crashes so I guess that I breach some sort of restriction.

JQuery version is 1.9.1 Google Maps: https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&language=en This is my latest crash report: https://crash-stats.mozilla.com/report/index/bp-4946eb1f-9f14-42f7-9fde-1d85c2130829

How can I prevent this crashes?

I've written a Wallboard Application that uses a permanent Websocket connection to retrieve new data from the server (the content get's pushed out to the monitors). The Websocket Server is a .Net Application that runs a HTTP Server that accepts normal HTTP request as well as Websocket. The client (Wallboard Frontend) uses Firefox to connect to the Server. Right now I use 4 firefox instances! (different profiles) to show on 4 different screens. The Application is designed to be administrated from the management interface (part of the Backend) only, so that there is absolutely no interaction with the firefox windows necessary. The Frontend is running 24/7. The Frontend uses JS to connect to the Websocket Server and reconnects automatically in case the connection drops or any other error occurs. The body-tag is empty in the beginning. After the WS Connection is established I use JQuery to change the body's innerHTML. Many tags have GUIDs as id-attribute. I use them to update the conectent. That means the server sends new HTML content and the client uses JQuery the change the innerHTML of <span id="348h9-34g9-..."/> for example. This works perfectly fine for all configurations except for one. I usually update content every 60s. The only difference to the other screens is that I use Google Maps on this one. The content that get's replaced by JQuery looks like this: <div id="map-canvas"></div> <script> try { var mapOptions = { zoom: 5, center: new google.maps.LatLng(66.14352, 18.00382), disableDefaultUI: true, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); setMarkers(map); } catch(err) { } </script> The script reference to the Google Maps API is permanently located in the header. This is the code I use to replace content: $('#' + n[1]).empty(); $('#' + n[1]).html(n[2]); //n[2] contains the code above This works perfectly fine for a few hours. Then Firefox crashes. BTW the same thing happens with Chrome: 'Aw snap'. I would expect a Javascript-Error but not Firefox to crash. Safe-Mode doesn't help, disable JS would make no sense. It doesnt matter which profile I use. When I set the Update Interval to 5 minutes instead of 60 seconds it works longer but it still crashes so I guess that I breach some sort of restriction. JQuery version is 1.9.1 Google Maps: https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&language=en This is my latest crash report: https://crash-stats.mozilla.com/report/index/bp-4946eb1f-9f14-42f7-9fde-1d85c2130829 How can I prevent this crashes?

All Replies (5)

more options

Boot the computer in Windows Safe mode with network support (press F8 on the boot screen) as a test to see if that helps.

more options

If that helps would it mean I have to work in Safe Mode the whole time or is it just investigation? Does Firefox behave different in safe mode? I'll start it in Safe Mode over the weekend and see what happens.

more options

Booting the computer in Windows Safe Mode makes it possible to check whether other software running on the computer is contributing to this issue.
Firefox Safe Mode only check for specific issues.

In Firefox Safe mode these changes are effective:

  • all extensions are disabled
  • the default theme is used (no persona)
  • userChrome.css and userContent.css are ignored
  • the default toolbar layout is used (localstore-safe.rdf)
  • the Javascript JIT compiler is disabled
  • hardware acceleration is disabled
  • plugins are not affected
  • preferences are not affected
more options

Firefox crashes in Safe-Mode too. Here is the crash report from Safe-Mode: https://crash-stats.mozilla.com/report/index/bp-6f3bc9a7-6653-42b9-87bb-2eb762130831

Any other ideas?

more options

Unfortunately that is a crash report with a [@ EMPTY] signature and does not provide crash data, so it is not possible to tell something about the cause of the crash.

This crash report does show a rather high memory usage that might contribute:

  • System Memory Use Percentage: 88