Displaying 20 results from an estimated 10000 matches similar to: "How is Actionpack is not thread-safe? @@allow_concurrency?"
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
6
Mutex::Synchronize with backgroundrb
I have a question concerning where to use the synchronize function. The
point of it is to put all of the code blacks passed to this function in
a queue. This make sure that code gets ran one at a time. This is
required when doing any kind of database activity in backgrondrb and
multiple threads. Otherwise I lose the connection to my database.
So here is my question:
Do I need to do:
@lock =
2006 May 30
4
Rails / ActionPack thread safety
Hi all,
Both the rails book (1st Ed) and the docs on the rails site (*and* the
Mongrel FAQ) tell me that rails (& ActionPack /ActiveRecord) is not
threadsafe. Since I need lots of worker threads in the app I''m working on
(details at the end of this mail) this poses quite a problem for me.
Is the lack of thread safety a conscious design decision (kind of
understandable for rails
2006 Aug 24
10
MongrelCluster - How can I make a request to a specific mongrel instance?
In our app we''ve a number of singleton ruby classes that cache static data
in hashes, things like
string values, system config params, etc). In a webbrick environment this
works ok, but we find
in production we have a problem because we have 4 caches, one for each
mongrel instance.
This also isn''t a BIG problem, but our cache.reload() methods are kinda
useless now, because
we
2006 Oct 24
1
Broken thread Safe connection Management on Mysql (Mysql too many connections errors)
Hi,
There is an issue on socket connection with backgroundrb (rev 47) and
mysql backend: after a certain number of job you reach the mysql
connection limit as socket are never closed and nobody can connect to
mysql anymore till you stop the backgroundrb daemon.
Already reported on:
http://rubyforge.org/pipermail/backgroundrb-devel/2006-July/000066.html,
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
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 Sep 25
3
Engine Yard blog
Just received the news from Tom Mornini.
Congrats Ezra for the new Engine Yard site and the blog you will be
collaborating.
Hope to read you there soon.
http://www.engineyard.com/
Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060925/3f251fa4/attachment.html
2007 Sep 03
11
MySQL has gone away
Hi,
in a production environment we are running into "MySQL server has gone
away" errors (see below) when we call rebuild_index in aaf. This happens
sporadically.
Any suggestions for what might be wrong or workarounds? I guess we try a
reconnect before we call rebuild_index?
Matthew
ActiveRecord::StatementInvalid (Mysql::Error: MySQL server has gone
away: SELECT count(*) AS
2006 Aug 10
2
Software caused connection abort
Hi Zed or anyone that is also looking at Mongrel,
Just want to report something that, although doesn''t crash mongrel, is
rather annoying.
I am running the latest Mongrel 0.3.13.3 - ruby version on cygwin
(yeah, poor me). When I start mongrel_rails with
ActiveRecord::Base.allow_concurrency = true in environment.rb, I see a
lot of
"Error sending file
2006 Jul 18
6
backgroundrb - Connection closed
Hello,
maybe someone can help with backgroundrb. I''ve written an application, which
makes use of backgroundrb. Everything works fine on my development machine, but
it crashes on my production server.
Something seems to be wrong with backgroundrb, but I don''t know the cause. All I
get is the error message attached below, which is extracted from the production.log.
I
2006 May 28
5
Rails, ActionController::Base.allow_concurrency and mongrel
Hello all,
Are you aware of the rails ActionController::Base.allow_concurrency option ?
If this option is true, rails is able to process simultaneous multiples
actions.
It appears that rails is thread-safe (if the user application is), and
that this option is mostly unknown.
Webrick take care of this option in rails-1.1.2/lib/webrick_server.rb at
line 80 :
REQUEST_MUTEX.lock unless
2006 Jan 25
7
Global Data, where can it go?
I''m developing a stateful Ruby application that needs to keep data in
one location where all people accessing the site can modify its
contents. This data will be read-from/written to often, so I would
prefer for rails to keep it in memory, rather than a database.
My frist try involved global variables. After discovering that they
were being "re-initialized" with each new
2006 May 15
10
BackgrounDRb background task runner and Application Wide Context Store
Friends-
I''m happy to annouce the first alpa release of BackgrounDRb. This is
a small framework for managing long running background tasks that
allows for ajax progress bars and more. It also serves as an
Application wide cache and context store for when you need something
like sessions but shared between users and multiple backend processes
like fcgi''s or mongrels.
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 Aug 26
0
postgres-pr barfs at ActiveRecord::Base.allow_concurrency = true
Hi List,
first of thank you Ezra for BackgroundRB. Very cool plugin indeed!
This is a public service FYI. In case you are running postgres as
your database backend and you are seeing the following errors in
your backgroundrb.log:
ActiveRecord::StatementInvalid: NoMethodError: undefined method
`async_query'' for #<PGconn:0x22ed648>:
You are using the postgres-pr adapter
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 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
2006 Feb 20
3
Background work
Greetings,
I''ve got a rails app which is basically an admin interface to a xml
dataset. Currently I''ve got rails rigged to call a function to spit the
entire dataset to file with every change. This would actually be ok, its
fairly infrequently updated, but when the dataset grows large the user sits
there waiting for it to dump with no feedback as to whats going on. Oh yes,
2006 Aug 03
2
thread problems
I have a really long series of queries (import from other database*)
that takes about 2 or 3 minutes. I wanted to spawn a thread and put the
job there, but there seems to be some problems with active record and
threads: (this is what I found after googling)
Thread.abort_on_exception = true
=> true
100.times do
Thread.new do
Client.find(:first)
end
end
this throws an exception... So