When you get “JavaScript runtime is out of memory; server shutting down instance” errors in your FMS logs, and your app won’t stay loaded, and none of your clients can connect, you need to increase the amount of memory available to the script engine.
In the docs for FMS 4.0, the JSEngine tag is “deprecated”. This means that when your app runs out of the default 1024K, and you try to crank it up to 51200, it’s actually not changing anything. In FMS4.0, you have to change the xml tag, in Application.xml, to ScriptEngine, increase the setting, and restart fms, to fix this.
This was fun. Installed asterisk from ports, version 1.8.
asterisk-gui (which is in /usr/ports/www in case you were looking for it in /usr/ports/net) installs okay. Edited manager.conf and started getting a browser loop. Found a bug report from about a month ago. There is javascript version detection, and it hasn’t been corrected to check for version 1.8, and so it loops badly.
In the file, /usr/local/share/asterisk/static-http/config/js, change the asterisk1.6 to 1.8 like below (highlighted in red):
detectPlatform: function(resp){ sessionData.AsteriskVersionString = resp; // logic for platform detection, if( sessionData.PLATFORM.isAA50 || sessionData.PLATFORM.isABE ){ if( sessionData.PLATFORM.isAA50 ){ sessionData.PLATFORM.isOSA = false ; sessionData.PLATFORM.isAST_1_4 = false ; sessionData.PLATFORM.isAST_1_6 = false ; sessionData.listOfCodecs = { ‘ulaw’ : ‘u-law’ , ‘alaw’ : ‘a-law’ , ‘gsm’ : ‘GSM’ , ‘g729’ : ‘G.729A’, ‘g726’ : ‘G.726’ , ‘g722’ : ‘G.722’ }; } // ?? }else{ var resp_lower = resp.toLowerCase(); if( resp_lower.contains(“branches/1.4”) || resp_lower.contains(“asterisk/1.4”) || resp_lower.contains(“svn-branch-1.4”) ) { sessionData.PLATFORM.isAST_1_4 = true ; sessionData.PLATFORM.isAST_1_6 = false ; }else if ( resp_lower.contains(“branches/1.6”) || resp_lower.contains(“asterisk/1.8“) || resp_lower.contains(“svn-branch-1.6”) || resp_lower.contains(“svn-trunk-“) ){ sessionData.PLATFORM.isAST_1_4 = false ; sessionData.PLATFORM.isAST_1_6 = true ; }else { sessionData.PLATFORM.isAST_1_4 = true ; sessionData.PLATFORM.isAST_1_6 = false ; } } },
The lynx browser is updated at version 2.8.8dev9 – I have blogged about using it to restream IP camera video.
I’m doing a fair amount of interesting video streaming with Scale Engine. We are engineering geo-located fast-start high bandwidth h264 video on demand and live streaming.
This is completely undocumented so I thought I’d share.
Set app pool A in advanced settings, to have affinity True, and mask 255. It will use the first 8 processors. Confirm in task manager.
Set app pool B affinity True, and mask 65280. It will use processors 9-16. Works.
Use this vcl_fetch to add a custom Expires header to objects. This example adds one day (86400 seconds).
sub vcl_fetch {
set beresp.grace = 4h;
set beresp.ttl = 300s;
C{
#include
static char timebuf[30];
char *format = {“%a, %d %b %Y %H:%M:%S GMT”};
struct tm timestruct;
time_t now;
time(&now);
now+=86400;
gmtime_r(&now, ×truct);
strftime(timebuf, 30, format, ×truct);
VRT_SetHdr(sp, HDR_BERESP, “\010Expires:”, timebuf, vrt_magic_string_end);
}C
return(deliver);
}