problem about worker-Collection of common programming errors
Andy Thomas
java multithreading performance process worker
I am implementing a worker pool in Java. This is essentially a whole load of objects which will pick up chunks of data, process the data and then store the result. Because of IO latency there will be significantly more workers than processor cores.The server is dedicated to this task and I want to wring the maximum performance out of the hardware (but no I don’t want to implement it in C++). The simplest implementation would be to have a single Java process which creates and monitors a number of
saGii
ruby-on-rails-3 memory-management heroku worker
I have a rails app deployed on heroku. We have ONE worker (jobs:work) which serially creates seven manager objects (one for each task) and runs methods on them in an infinite loop. This is what the main code looks like (the essential part of it anyway):loop dobeginManager.subclasses.each do |manager_klass|manager_klass.new.processend#exception handling hereendsleep(1) endNone of the tasks do something like Model.all or such. I’ve read many articles about leaks and bloats in ruby and avoided most
Khaled Garbaya
actionscript-3 flash flash-builder backgroundworker worker
Hello I am trying to record the user sound using AS3 Worker everything works well when it comes to communication between the worker and the main scene but I think the record functionnality have and issue here I am using the Record Clash from bytearray.org (http://www.bytearray.org/?p=1858) and here’s is my code am I missing something :package objects {import flash.events.Event;import flash.system.MessageChannel;import flash.system.Worker;import flash.system.WorkerDomain;import flash.utils.ByteAr
eeejay
html5 mobile safari worker
I cannot make an instance of Worker on Mobile Safari on an iPad with OS 4.2xThis is a very common and well-known HTML5 Web Worker demo: http://html5demos.com/workerWhen I try to run I get the error ReferenceError: Can’t find variable: WorkerThis demo works fine on desktop Safari. My understanding was that with OS 4.2x that HTML5 Web Workers would be supported on mobile safari. Does anyone know different?
user1618606
linux apache2 vps worker
I activated Apache Worker on my VPS and I’m having problems, ’cause the website is crashing when 3000 users are accessing the website. I’m using http://whos.amung.us/stats/2jzwlvbhvpft/ as counter.My Apache Worker configuration:KeepAlive On MaxKeepAliveRequests 0 KeepAliveTimeout 1<IfModule mpm_worker_module> ServerLimit 20000 StartServer 8000 MinSpareThreads 10400 MaxSpareThreads 14200 ThreadLimit 5 ThreadsPerChild 5 MaxClients 20000 MaxRequestsPerChild 0 </IfModule>The VPS have the
Andrew Marshall
ruby-on-rails-3 heroku crash background-process worker
I have an application written in Rails, deployed on Heroku. I used to have been working on 1 web dyno, but today I have published the app, the traffic is quite big so I decided to increase to 4 web dynos and 1 worker dynos. I don’t know why always when I do heroku ps it shows: Process State Command ——– ————– ——————————— web.1 up for 22s bundle exec rails server -p $PORT web.2 up for 36s bundle exe
Kay Nelson
iis7 process worker
We see the following exceptions in event viewer.An unhandled exception occurred and the process was terminated.Application ID: /LM/W3SVC/1/ROOTProcess ID: 3116Exception: System.NullReferenceExceptionMessage: Object reference not set to an instance of an object.StackTrace: at MyCompany.xxx.XxxCallback(IAsyncResult asyncResult)at System.Web.Services.Protocols.WebClientAsyncResult.Complete()at System.Web.Services.Protocols.WebClientProtocol.ProcessAsyncException(WebClientAsyncResult client, Exce
Jason Slocomb
c# asp.net process worker http-status-code-503
My knowledge of how processes are handled by the ASP.Net worker process is woefully inadequate. I’m hoping some of the experts out there can fill me in.If I crash the worker process with a System.OutOfMemoryException, what would the user experience be for other users who were being served by the same process? Would they get a blank screen? 503 error? I’m going to attempt to test this scenario with some other folks in our lab, but I thought I would float this out there. I will update with our res
James B
android android-fragments worker
I’m trying to learn how to use a fragment as a worker for an android activity. I have the following simple xml layout for my main activity:<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”android:layout_width=”fill_parent”android:layout_height=”fill_parent”android:orientation=”vertical” ><Buttonandroid:id=”@+id/update”android:layout_width=”wrap_content”android:layout_height=”wrap_content”android:text=”Press me” /><TextViewandroid:id=”@+id/text”android:layout
acudars
angularjs factory web-worker worker angular-services
I’m using AngularJS Seed and I want to see a working implementation of a Web Worker.I want to make a simple Web Worker work in order to understand it, but I’m running into an issue with the functionality.I have the Web Worker code in the services.js like so:’use strict’;/* Services */ var app = angular.module(‘myApp.services’, []).app.factory(“HelloWorldService”,[‘$q’,function($q){var worker = new Worker(‘js/doWork.js’);var defer;worker.addEventListener(‘message’, function(e) {console.log(‘Worke
Joe Beuckman
module titanium worker
I have the module installed but I can’t figure where in the project my worker.js file should go. This is an Alloy project and I have tried putting the file in a few different places.I pared my worker down to this for testing:worker.addEventListener(‘message’, function(event){worker.postMessage(‘complete’); });I keep getting this error:The application has crashed with an uncaught exception ‘NSInvalidArgumentException’. [DEBUG] Reason: [DEBUG] *** -[NSURL initFileURLWithPath:]: nil string paramete
johnjbarton
javascript html5 dom inheritance worker
I tried to create a new kind of Worker class in JS: function ConnectedWorker(workerSrcURL, onConnect) {function filterOnConnect(rawPort, url) {if (url.indexOf(workerSrcURL) !== -1)onConnect(rawPort, url);}ChannelPlate.PortServer(workerSrcURL, filterOnConnect);Worker.call(this, workerSrcURL);this.onmessage = onConnect; } ConnectedWorker.prototype = {__proto__: Worker.prototype };but it fails on the Worker.call() Uncaught TypeError: Failed to construct ‘Worker’: Please use the ‘new’ operator, this
arkanciscan
javascript postmessage web-worker worker domexception
When writing the onmessage callback for a Web Worker I get an “Uncaught Error: SYNTAX_ERR: DOM Exception 12” in my console when I try to send another postMessage().var w = new Worker(url); w.onmessage = function(e) {if(e.data.msg==’validate’){if(validateWork(e.data.wrk)){postMessage(‘proceed’);}} }
PhilG
ruby module worker
I am programming a distributed system where a worker performs some job and in order to start the worker a init.rb is started which loads the lib folder and performs some configuration. Structureinit.rb lib |– modulename | |– foo.rb | |– configuration.rb | `– worker.rb `– modulename.rbinit.rb$LOAD_PATH.unshift(File.expand_path(“../lib”, __FILE__))require “bundler/setup” require “modulename”ModuleName.configure do |c|c.log = “module.log”c.pool_size = 10 endmodulename.rbrequire “si
Charlie Lipford
multithreading function node.js cluster-computing worker
So I am working on a project in Node.js and I want to open up some extra threads to handle the processing load more efficiently. But I am using classes with function definitions with them and when I try to send those objects to the worker thread, the functions defined in the object disappear and I am only left with the other fields in the object. Is there a way to send the worker an object and preserve the functions so they can be called within the worker?var cluster = require(‘cluster’);if(clus
puggsoy
actionscript-3 flash worker
For some reason, when I try to receive a shared property from a Worker (in AS3), the result is always null. That is, I send a value to a Worker using setSharedProperty(), when I retrieve it using getSharedProperty(), it always returns undefined/null.Here’s a simple test I set up:package {import flash.display.Sprite;import flash.system.Worker;import flash.system.WorkerDomain;public class Main extends Sprite {private var _worker:Worker;public function Main():void {if (Worker.current.isPrimordial)
rationalboss
javascript class function object worker
In my game, I have a character class:var NPC = function(isometry,timer,canvas,tile,tileMap,scrollPosition, grid,spritesheet, r1, c1, currentHero, hh, hw,index) {this.index = index; …. NPC.prototype.w = new Worker(‘astar.js’);this.w.onmessage = function(e) {//process worker results, ‘index’ is strongly needed // e is data from worker //it draws path for the character on the common tileMap:tileMap[e.data[i].x][e.data[i].y] = index; }Then in main program I create two objects of that class:var
Ori
javascript caching html5 offline worker
I’m trying to access the offline application cache of a shared webworker (HTML5) with no luck. I’ve been banging my head against this problem for many hours, so I must be missing something… Any help from a JavaScript Ninja out there would be highly appreciated!The W3C the spec says that: cache = self.applicationCache(in a shared worker) should return the ApplicationCache object that applies to the current shared worker.I’m spawning a shared worker from my app’s main script via:var worker = new
kiamlaluno
drupal drupal-7 fastcgi worker
I’ve got a very strange behaviour, and I can’t figure out what is the issue.I installed Apache2 + PHP FastCGI + MPM worker and the Drupal 7 website is served blazing fast. However, everytime a user hit a page unknown (that doesn’t exist), the server gives back “Forbidden. You don’t have permission to access / on this server.” and any following hits on the front page (i.e www.mysite.com which is valid of course) gives the same error. After around 15 seconds, it comes back to normal, and the users
Web site is in building