Displaying 20 results from an estimated 5000 matches similar to: "ActiveRecord thread-safety"
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 May 12
5
How is Actionpack is not thread-safe? @@allow_concurrency?
Hi,
I found many references on the Web to the fact
that "Rails is not thread-safe".
However, I have not found an explanation _why_ it isn''t?
What happens if multiple requests are handled concurrently
by ActionPack?
Assuming that the code I execute in my controller methods
is thread safe, is this ok?
If not -- what happens?
The following makes it sound like the issue is
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 Jun 18
0
Thread safety in activerecord(?), connection lost to mysql server - simple code sample provided
Hello all,
I know that this issue has come up before, but I read all the previous posts
regarding thread safety and haven''t come up with a solution. I''m spawning
lots of threads in a backgroundrb worker that each do things with
activerecord models. I get the connection lost to mysql server exception
about 90% of the time, with my process working by sheer luck the other 10%.
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,
2007 Jul 05
6
Rails, background threads, ActiveRecord
Let''s start out without ActiveRecord, just to make the case. So, I have
a calculation that will take a while to run in my Rails app.
One doesn''t really want to just hold a HTTP connection open until it''s
done, for a variety of obvious reasons.
Even though everyone says "Rails isn''t thread safe", I can''t think of
any reason this would be a
2013 May 23
4
[LLVMdev] Usage of getenv() inside LLVM and thread safety
Hello,
In Rubinius we're seeing an occasional crash inside LLVM that always happens inside getenv(), which is used for example when creating a MCContext (inside lib/MC/MCContext.cpp, it checks getenv("AS_SECURE_LOG_FILE")).
The problem is that getenv() and friends aren't thread safe and Rubinius provides a multithreaded system. We can relatively easily get locking setup around
2009 Dec 04
1
[PATCH] lib: Add thread-safety to global list of handles.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
-------------- next part --------------
>From 8bef0ef3f3a65360f9fa6ccebb62c21a8463d5fe Mon Sep 17 00:00:00 2001
From: Richard
2013 May 23
0
[LLVMdev] Usage of getenv() inside LLVM and thread safety
Right. glibc's amusing stance is that you setenv/putenv are not thread
safe, but getenv is. I assume Ruby exposes setenv and therefore simply not
calling setenv isn't an option.
Would it solve your problems if all getenv() calls happened at
cl::ParseCommandLineOptions() time?
On Thu, May 23, 2013 at 9:49 AM, Dirkjan Bussink <d.bussink at gmail.com>wrote:
> Hello,
>
>
2006 Jan 13
1
ActiveRecord: using with multiple threads/DB connections
Hi,
I''m totally new to Ruby and Rails and I''m trying to set up a prototype
web site. Unfortunately, I''m having problems with ActiveRecord using
multiple threads.
What I want to do is fairly simple. I have a Controller that receives
and saves data from the web in the DB, but once that''s done I want to
process this data in another thread and then save the
2006 Feb 28
6
Threading & database connections.
Hello all.
Bear with me, there is a Mongrel question in here ;)
I have been having some fun with database connections and ruby. Long story ( Found here: http://www.ruby-forum.com/topic/56047 ) short: I was making far too many in my application. I eventually fixed this (I thought) and when running webrick there were only ever two connections (One to each database) no matter how many users, this
2006 Nov 24
7
Anyone know whats going on with PostgreSQL async_exec errors?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Anyone know what''s going on with ActiveRecord Edge and 1.2RC1 unit
tests. I get 13 failures from the "async_exec" method call. ie:
test_callback_rollback_in_save(ConcurrentTransactionTest):
ActiveRecord::StatementInvalid: NoMethodError: undefined method
`async_exec'' for #<PGconn:0xb75a8754>: SET
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 =
2009 Jan 21
8
cifs perfomance
Hello!
I''am setup zfs / cifs home storage server, end now have low performance with play movie stored on this zfs from windows client. server hardware is not new , but n windows it perfomance was normal.
CPU is AMD Athlon Burton Thunderbird 2500, runing on 1,7GHz, 1024 RAM and storage:
usb c4t0d0 ST332062-0A-3.AA-298.09GB /pci at 0,0/pci1458,5004 at 2,2/cdrom at 1/disk at
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
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 Mar 30
4
Upgrading to 1.1 causes MySQL Lost Connections under WinXP
Ok so I updated my rails to version 1.1 and now all of a sudden I keep
getting the dreaded "Mysql::Error: Lost connection to MySQL server
during query: SHOW FIELDS FROM ..." I''ve read all the stuff on the net,
but none of it is working. I tried installing the mysql.so like
suggested here:
http://wiki.rubyonrails.org/rails/pages/HowToUseMySQLRubyBindingsOnWin32/
That sort
2013 May 23
0
[LLVMdev] Usage of getenv() inside LLVM and thread safety
That sounds like a missed multi-threading issue with LLVM. I can't imagine
why the user should be forced to serialize creation of MCContext objects. I
would suggest filing a bug for this. A simple lock probably wouldn't be
too detrimental to performance here, since MCContext objects shouldn't be
created too often.
On Thu, May 23, 2013 at 9:49 AM, Dirkjan Bussink <d.bussink at
2012 Dec 26
2
Can't build kernel with ndis
I am trying to build FreeBSD update, STABLE branch, and buildkernel apparently snagged on ndis, which I don't want to do without. According to "man ndis", I need in kernel config
options NDISAPI
device ndis
device wlan
which I have:
device wlan # 802.11 support
options NDISAPI # This is in the hope of enabling Hiro USB wireless adapter
device
2008 Jan 15
6
SQLite concurrency, SQLite3::BusyException
I am currently experiencing concurrency issues after moving from MySQL
to SQLite.
My original program worked fined using MySQL but is now returning
"SQLite3::BusyException" errors. The same result happens whether or
not I enable the allow_concurrency flag.
If I do manually acquire a lock on the SQLite DB the problem would
disapear, but I thought that rails was supposed to handle this