similar to: Avoiding race conditions

Displaying 20 results from an estimated 6000 matches similar to: "Avoiding race conditions"

2006 Aug 08
12
Rails (internals) architectural question
Hi Another newbe here..... I was wondering if someone could please help me understand the controllers/view inner working in Production 1. If xxx_controller.rb is only loaded once does it mean there is only one instance of Controller serving all requests? 2. If only one instance of controller is there then how are controllers instance variables protected from data corruption when serving multiple
2007 Nov 20
2
Anyone using to_xml and procs...
I''m looking for comments on http://dev.rubyonrails.org/ticket/10162 In my opinion, the current behaviour is a bug, and should be fixed. If you have a use case where passing procs to the child associations is actually useful, chime in. Jonathan del Strother --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2007 Nov 13
4
question about activerecord test_numeric_fields in base_test.rb
There''s a test for activerecord called test_numeric_fields in base_test.rb. here''s the test def test_numeric_fields m = NumericData.new( :bank_balance => 1586.43, :big_bank_balance => BigDecimal("1000234000567.95"), :world_population => 6000000000, :my_house_population => 3 ) assert m.save m1 =
2006 Aug 07
8
Login form question
I''m using Rails Recipes to create a login form but instead of username and password, my setup is firstname, lastname, password. I seemed to be gramatically challenged and not sure how to set up the parameter list. Can anyone offer up a suggestion. The book shows the method starting like: if request.post? user = User.find(:first, :conditions => [''username = ?'' ,
2007 Feb 06
2
Login systems : stubbing accounts and AR association proxies
My Rails site has a fair amount of login and ''ownership'' logic. For instance, we have a number of clients (companies), each of which has several accounts. A client owns a number of different types of resources, and shouldn''t see any other clients'' resources, so, for example, our ScenesController contains a lot of references to
2006 Aug 24
9
[slightly offtopic] A small, fast Apache2.2 (if there is such a thing)
Hi. I''m using Apache2.2 built from source + mod-proxy + ssl + svn. Everything works fine but I''m sure you I could disable a ton of modules during the build process and in httpd.conf to speed things up and run a tighter memory footprint. Has anyone bothered building Apache2.2 from source disabling all the unneeded modules. I am planning on going through the Apache docs but I
2006 Jul 20
5
Why don''t I get 404s?
When I go to a missing page in my rails app, I get the 500.html page, and this in my log output: no route found to match "/asdasd" with {:method=>:get} ./script/../config/../vendor/rails/actionpack/lib/action_controller/ routing.rb:1057:in `recognize_path'' ./script/../config/../vendor/rails/actionpack/lib/action_controller/ routing.rb:1047:in `recognize''
2008 Jan 03
2
Interresting Changeset for Rails Trunk...
>From http://blog.codefront.net/2008/01/02/whats-new-on-edge-rails-the-pilot/ A native Mongrel handler has been introduced. This is so that it can be worked on independent of Mongrel?s release cycle (the Rails handler is currently in the Mongrel codebase). Jeremy Kemper (bitsweat) has already made a minor performance improvement by moving the mutex from the handler itself into the dispatcher.
2011 Dec 08
5
Master repeatedly killing workers due to timeouts
Hi, We''re using unicorn as a Rails server on Solaris, and it''s been running great for several months. We''ve recently been having a few problems and I''m at a loss what might cause it. A number of times in the past few days, our unicorn slaves keep timing out & the master keeps restarting them. unicorn.log looks something like : E,
2008 Jun 17
6
x_send_file sends a 1 byte file
Hello, sorry if creating a dupe... I''m trying to download files to authenticated users in my app. I''ve set up x_send_file. All seems to be correct to me, however when I try to download any file, I get a 1-byte long file downloaded. I am getting this already in development - so no Apache, no lighthttpd, just a mongrel_rails start in the root of my app. Any help/hint would be
2006 Aug 16
1
Stale object errors
I''m running into a couple of stale object problems with methods that at first glance appear fairly atomic - eg Message.update(params[:id], {:body => params[:value]}) Of course, Rails has to instantiate the object & validate it before it updates the database, so it''s not actually atomic, hence the occasional staleobject error. So I''ve been wondering about
2006 May 10
4
validates_uniqueness_of and create atomicity
Hi folks, I have a question regarding validates_uniqueness_of, and similar before-filter-like events attempting to guarantee some DB state prior to modification. >From my reading of ActiveRecord, validate_uniqueness_of appears to cause a SELECT on the underlying table attempting to ensure that a record with ID(s) specified in the validates_uniqueness_of statement is not already present, prior
2013 Feb 04
2
reshape help
Dear R users - I have a list of patient identifiers and diagnoses from inpatient admissions. I would like to reorganize the list, presently in a long format to a wide format in reshape, but in the absence of a "time" element, I am uncertain how to do this - any help greatly appreciated. ID Dx A nausea A diabetes A kidney failure A heart attack A fever B fever B
2006 Jul 07
3
Mongrel & irbrc
Why does mongrel_rails insist on loading ~/.irbrc with each request? a) I''m curious why it loads it at all (I assume there''s no way of getting an inline breakpointer??) b) Why re-load it? It causes problems with any constants that are used in .irbrc... (alternatively, how do I avoid re-assigning to a constant?) Jon -------------- next part -------------- A non-text
2006 Sep 28
1
upload_progress and DRb.start_service crashes
Whenever I tried to start mongrel_rails with the upload progress script, it would die with the following error: /usr/local/lib/ruby/1.8/drb/drb.rb:837:in `getaddrinfo'': getaddrinfo: No address associated with nodename (SocketError) from /usr/local/lib/ruby/1.8/drb/drb.rb:837:in `open_server_inaddr_any'' from /usr/local/lib/ruby/1.8/drb/drb.rb:860:in
2006 May 25
5
[OT] Rails hosting question -- video centric
This is OT in the sense that it''s yet another hosting question and not strictly a problem I''m having with Rails. Basically, I trust and appreciate the knowledge of the folks on this list so I''m hoping for some insight. I have a new project that I''ll be starting up soon. It''s basically going to feed videos. The webapp piece is trivial. I''m
2006 Aug 10
4
Speeding up ActiveRecord creation?
My completely empty model (no validation callbacks etc etc) takes an average of 0.05 seconds to create, at least according to Benchmark.realtime{200.times{Message.create(:from => "me@here.com", :message_type => ''email'', :subject => "hello", :body => "goodbye", :sent_at => Time.now)}}/200 That''s a little slower than
2017 Nov 16
0
Re: [PATCH 0/3] Alternate way to avoid race conditions when nbdkit exits.
On 11/14/2017 11:30 AM, Richard W.M. Jones wrote: > This fixes the race conditions for me, using the test described here: > > https://www.redhat.com/archives/libguestfs/2017-September/msg00226.html Running test-socket-activation in a loop, I've hit other races (some provoked a bit more easily with the code I'm working on), and will be posting some patches where I know the
2017 Nov 14
0
[PATCH 2/3] Avoid race conditions when nbdkit exits.
There are several race conditions where nbdkit exits (calling plugin_cleanup() which unloads the plugin), while the plugin is either in a callback or in plugin.close(). Avoid these by: (1) Taking a shared lock around all plugin callbacks. (2) Taking the same as an exclusive lock in plugin_cleanup. This delays plugin_cleanup until all callbacks have finished. (3) Removing a few unnecessary
2006 Aug 26
2
Mongrel grammar file
Hey Zed, any chance you mind sharing the grammar file you use with lemon to create the parser? I''ve been meaning to sit down and learn how to use one of those things. If not, any suggestions on a good resource for learning how to use a LALR parser?