similar to: Worker pool worker for page scanners: lost connection to mysql

Displaying 20 results from an estimated 8000 matches similar to: "Worker pool worker for page scanners: lost connection to mysql"

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 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 Aug 07
1
:load_rails
if CONFIG[''load_rails''] ActiveRecord::Base.allow_concurrency = true ActiveRecord::Base.establish_connection(YAML.load(ERB.new(IO.read ("#{RAILS_ROOT}/#{CONFIG[''database_yml'']}")).result)[CONFIG[''environment'']]) end if i read the code right, this option doesnt really load rails. wouldnt it be better (for those who rely on the
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
2007 Dec 28
9
lost connection 2.0
I lost my "connection lost" error.. but now I''ve got a "Mysql::Error: MySQL server has gone away" error.. It comes from: /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/connection_adapters/abstract_adapter.rb:128:in ''log''. I''m not sure if Rails / BackgroundRb uses it .. but i''ve got the mysql (2.7) gem
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 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 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
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
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 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 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
2013 Oct 20
2
optimize la value of pool in database.yml
Hi, I would like to understand how to calculate optimal value for "pool" parameter in database.yml I''m using rails 3, ruby 2, postgres, elasticsearch, unicorn, nginx My server : 12 coeurs 24 threads ( I dont know if it is necessary for define pool value) unicorn : worker_processes 24 I have around 1500 pages requested per minutes, and around 200ms per request Is it also
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
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 Sep 14
1
Status of your worker pool
On Sep 14, 2006, at 10:25 AM, Michael Siebert wrote: > Hey Ezra, > how is the status of your worker pool? i need some thing like this > ASAP and i can''t get David Lemstra''s QueueWorker to work, so: whats > the status? do you have some "beta" lying around on your hard > drive? I dont want to spend my time on that if you''re coming up >
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 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 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 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