# Commands out of sync

**URL:** <https://www.ruby-forum.com/t/commands-out-of-sync/169684>\
**Category:** Rails\
**Created:** [June 7, 2009, 12:25am UTC](https://www.ruby-forum.com/t/commands-out-of-sync/169684 "2009-06-07T00:25:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kc123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/d6d6ee/32.png) [@kc123](https://www.ruby-forum.com/u/kc123)\
**Post date:** [June 7, 2009, 12:25am UTC](https://www.ruby-forum.com/t/commands-out-of-sync/169684/1 "2009-06-07T00:25:34Z")

</div>

I’m getting this error when talking to MySQL

Status: 500 Internal Server Error  
Mysql::Error: Commands out of sync; you can’t run this command now:  
UPDATE `sessions` SET `data

This is the :active\_record\_store that is calling this command for the  
session store.

---

<div class="post-metadata">

**Author:** ![kc123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/d6d6ee/32.png) [@kc123](https://www.ruby-forum.com/u/kc123)\
**Post date:** [June 7, 2009, 12:35am UTC](https://www.ruby-forum.com/t/commands-out-of-sync/169684/2 "2009-06-07T00:35:46Z")

</div>

It sounds like you are trying to run two commands at the same time and  
your first command hasn’t closed the session… In otherwords, trying to  
open more than one session without closing the first…

---

<div class="post-metadata">

**Author:** ![kc123](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/d6d6ee/32.png) [@kc123](https://www.ruby-forum.com/u/kc123)\
**Post date:** [June 7, 2009, 12:49am UTC](https://www.ruby-forum.com/t/commands-out-of-sync/169684/3 "2009-06-07T00:49:46Z")

</div>

I’m running a command to retrieve some records from the DB. This error  
is for the active\_record\_store which rails uses to manage sessions. I’m  
not executing this command from my code. Also, this is not happenning  
on the dev server.
