Ruby on Rails Monday, June 28, 2010

Well if we read this correctly the system updated the sessions table and then tried to read a record from the sessions table. That should have come back instantly. It would make sense if one request opened the session table but did not complete. Then the next request for the session table would have to wait until the previous one completes or times out. In theory you can get a deadlock like this with a database. But rails does a pretty good job (out of the box) of not generating such errors.


Here's something you might try. You are obviously using the database to store session data. If you can reproduce this problem in development try turning off storing sessions in the database. I think it is the 'config.action_controller.session_store' parameter in config/environment.rb

So
1) Reproduce the problem in development
2) Disable the storing of sessions in the database
3) See if the problem persists

If the problem is reproducible in development and goes away when you stop storing sessions in the database then we will know at least where the problem lies.

Finding out what the problem is however is something else entirely :)

On 28 June 2010 04:20, Zhao Yi <lists@ruby-forum.com> wrote:
The log file is waiting at this line:

^[[4;35;1mCGI::Session::ActiveRecordStore::Session Update
(0.000096)^[[0m   ^[[0mUPDATE `sessions` SET `updated_at` = '2010-06-28
03:20:03', `data` =
'BAh7CjoMcm9vdF9pZDA6DHVzZXJfaWRpADoOdXNlcl9uYW1lIgxidWlsZGVy\nOhFvcmlnaW5hbF91cmkiIC9idWlsZC91cGRhdGVfbWFrZV9kZXZfdmlldyIK\nZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsG\nOgtub3RpY2UiHVBsZWFzZSBsb2cgaW4gYXMgYnVpbGRlcgY6CkB1c2VkewY7\nClQ=\n'
WHERE `id` = 6297^[[0m
 ^[[4;36;1mSQL (0.000017)^[[0m   ^[[0;1mCOMMIT^[[0m
 ^[[4;35;1mCGI::Session::ActiveRecordStore::Session Load
(0.000187)^[[0m   ^[[0mSELECT * FROM `sessions` WHERE (session_id =
'4c4044505c20c44b79dacb53c236dbab') LIMIT 1^[[0m


Do you think it is waiting for Database response?
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment