Displaying 20 results from an estimated 8000 matches similar to: "Mutex::Synchronize with backgroundrb"
2006 Jul 12
1
When to use Mutex::synchronize?
I have a simple question when to the synchronize method in the Mutex
class.
Now that backgroundrb has allow_concurrency = true there is no need
to synchronize database calls in threads.
The question I have is lets say I have a simple method in my worker
as follows:
def some_method
SomeModel.find_all each do |obj|
obj.some_count += 1
obj.save!
end
end
It accesses the database, but
2007 Mar 05
3
postgres barfage revisted
First of all, I''d like to do what I''ve seen several others here do:
thank Ezra and any other contributors for producing a really great
plugin. Even though I''m having some minor problems, this is all so
approachable and easy to work with and dig into... I hate to think of
the hoops you''d need to jump through (both as creator of such a system
and as a user) to
2006 Aug 19
7
Impossible to get stable?
I have concluded that it is impossible to get this background process
stable. I am out of ideas and could really use some help.
Here is what I have:
50 workers, just running an infinite loop that constantly calls save!
on a model. Keep in mind this is just for testing purposes. I catch
all exceptions and put them in the log.
I am tried setting allow_concurrency to true and false. Neither
2006 Jul 20
3
Mysql Server has gone away?
First off, amazing plugin! Being a rails noob, it helped me do some stuff
I would''ve thought way over my head. Which brings me to my problem. :)
I''m using backgroundrb to handle some processes that take so long that I
don''t want them tied to a page refresh (several xml-rpc calls and saving
data in text files on the server). I got it working with backgroundrb
fairly
2006 Aug 18
1
Ezra....allow_concurrency = false?
In a previous email you wrote this:
Glad you''re getting some use out of the plugin ;) ActiveRecord does
have some issues with threading and concurrency that can sometimes
cause that error you are seeing. Open up your script/backgroundrb/
start file and comment out the following line:
ActiveRecord::Base.allow_concurrency = true
Make sure you do that up in your main app script folder
2006 Jul 06
5
memory uses
Hi All,
I have this small doubt. Does backgroundrb have anything to do with
dispatch.fcgi?
some dispatch.fcgi are taking memory as much as 186 MB ....
this is monstrous man...
Also, if i put load rails environment with backgroundrb.yml file to be
false.What will happen? i just loses access to db through ActiveRecord
right?
I can still use normal mysql gem to access db and modify the
2006 Aug 19
1
Setting the process priority?
Is it possible to make the process priority higher for backgroundrb?
Thank You,
Ben Johnson
E: bjohnson at contuitive.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060819/7a2e6d1b/attachment.html
2006 Aug 17
1
Worker pool worker for page scanners: lost connection to mysql
Hello,
I want to scan many URLs simultaneously with a new scanner worker for
each URL, but I keep getting Mysql::Error: Lost connection to MySQL.
Yes, allow_concurrency=false.
Each scanner thread needs access to my ActiveRecord models to store
discovered feeds and whatnot. There is a DB table called page_scans
that acts as a big queue holding URLs waiting to be scanned.
It would be
2006 Jun 16
5
BackgrounDRb / Testing Error: uninitialized constant BackgrounDRb
I''m digging into BackgrounDRb and having some problems testing a worker class.
The following line in my test (created from script/generate worker
Test) throws an error:
worker = TestWorker.new(:test_string => "testing...")
Error:
/activesupport/lib/active_support/dependencies.rb:123:in
`const_missing'': uninitialized constant BackgrounDRb (NameError)
from
2006 Jul 11
32
Database Concurrency Without a Web Server?
My Rails application requires a very busy worker process running in the
background at all times. I am launching this non-interactive process
using script/runner. This process is very busy and is communicating
with the MySQL server constantly. As I started putting some load on the
system to test, I started running into performance issues.
I have since discovered that Rails is only using 1
2006 Jul 24
4
Mongrel + BackgrounDRb + File Column = Upload Progress Bar?
Hi there,
I''ve been digging around trying to find some information (mostly examples)
on how one would handle a progress bar upload using BackgrounDRb and File
Column. I did read http://backgroundrb.rubyforge.org/ and Ezra''s blog of
course, but I still have a few questions.
I made a simple upload form (as a test) that is submitted to the
"upload_song" action.
def
2007 Jul 12
4
Backgroundrb needs a new maintainer.
Hello All-
Is there anyone out there that wants to take over as maintainer of
the backgroundrb project? I feel bad because I know lots of folks use
it but I absolutely do not have time to work on it anymore :(.
I''m looking for a new maintainer, I would give you all the access to
the project you need and try to help you come up to speed on the
codebase.
If anyone is
2006 Jun 21
4
one more suggestion for backgroundrb
this:
Index: script/backgroundrb/lib/backgroundrb.rb
===================================================================
--- script/backgroundrb/lib/backgroundrb.rb (revision 16)
+++ script/backgroundrb/lib/backgroundrb.rb (working copy)
@@ -29,7 +29,11 @@
# the log via @logger
def initialize(args)
@logger = BACKGROUNDRB_LOGGER
- Thread.new { do_work(args) }
+
2007 Feb 05
3
Deploying to production with backgroundrb (capistrano)
I have noticed that occasionally (about 50% of the time) when i
deploy (using capistrano) my app to a production server, i have to
ssh into the box and manually
stop and start backgroundrb to get it to load my workers.
this is my basic setup
i have 2 workers:
lib/workers/mp3_worker.rb => takes a hash of params to downsample an
mp3
lib/workers/flv_worker.rb => takes a has of
2006 Sep 24
5
Can''t Connect to BackgroundRB
I''m having trouble getting backgroundrb up and running in a
production environment.
Here''s my backgroundrb.yml:
---
port: "22222"
timer_sleep: 60
load_rails: true
environment: production
host: XXX.XX.XXX.50
database_yml: config/database.yml
acl:
deny: all
allow: localhost 127.0.0.1 XXX.XX.XXX.51
order: deny,allow
I start BackgroundRB from XXX.XX.XXX.50 with
2007 Jun 04
2
backgroundrb scheduler
I''ve been having a terrible time with the backgroundrb scheduler. The
issues I''m having is that the scheduled actions aren''t ran at all and if
they do, the process stays around forever. I''m using the backgroundrb as a
nightly cron to run some accounting operations.
questions:
1. How can I have the process destroyed after the worker completes?
2. Any idea on
2007 Dec 30
3
A newbie question regarding BackgroundRb
Hi all,
I just read Ezra''s article on BackgroundRb and decided to use it one
of my projects. I installed the plugin into my rails project using
script/plugin and then ran rake backgroundrb:setup to copy the yml
scripts.
Now my backgroundrb.yml looks like
=======
---
port: "22222"
timer_sleep: 60
load_rails: true
environment: development
host: localhost
database_yml:
2006 Sep 23
6
Connection to backgroundrb is lost when exiting action method
Hey.
I have a very annoying problem, and was wondering what is wrong.
Suppose I have backgroundrb running, and then I have an action in some
controller. In the action I define a worker. When leaving the action,
suddenly the connection to backgroundrb is lost:
DRb URI: druby://localhost:22222
Pid: 3976
Autostart...
done
druby://localhost:42531 - #<Errno::EBADF: Bad file descriptor -
2006 Jul 31
1
MySQL too many connections?
Does any have any idea why I would get:
Mysql::Error: Too many connections
I am creating new threads in my background process. I know
allow_concurrency is set to true. Does this create a new database
connection when a new thread is created? Because what I''m doing is
similar to this:
@threads[model.id] = Thread.new do
end
I also kill off these threads and over write some of the
2007 Jan 19
6
Stopping DRb after using BackgrounDRb::MiddleManDRbObject.init
Hi,
I''m having a problem where connections started through
BackgrounDRb::MiddleManDRbObject.init are not stopped, resulting in an
ever growing established connections between my Mongrels and remote
backgroundrbs
I added DRb.stop_service to my code executed after requests that init
MiddleManDRbObjects but that does not help.
Any ideas?
Thanks,
Robert Bjarnason