Wu-Wu / Dancer-Session-Redis

Redis backend for Dancer Session Engine
https://metacpan.org/release/Dancer-Session-Redis
1 stars 2 forks source link

crashed: Storable binary image v40.79 more recent than I am (v2.9) #3

Open mfouilleul opened 11 years ago

mfouilleul commented 11 years ago

Hi,

I'm testing Dancer::Session::Redis instead of my Dancer::Session::Memcached and i have this strange error :

[16860] error @0.059240> [hit #1]request to GET /dashboard/threshold/set/5/6/4/10 crashed: Storable binary image v40.79 more recent than I am (v2.9) at /usr/local/lib/perl/5.10.1/Storable.pm line 417, line 10, at /usr/local/share/perl/5.10.1/Dancer/Session/Redis.pm line 67. in /usr/local/share/perl/5.10.1/Dancer/Handler.pm l. 98


The strange thing it's i'm using Redis only for sessions (MySQL for database) and this error came when I quick_update something :

database->quickupdate('thresholds.seksi' . session->{cuid}, { id_srv => param('id_srv'), id_cntr => param('id_cntr') }, { operator => param('operator'), threshold => param('threshold') });

In the quick_update i'm using redis just for selecting an ID : session->{cuid}

With Dancer::Session::Memcached no problem, with Redis : http 500...

Best regards !

Max.

Wu-Wu commented 11 years ago

Hi. Dancer::Session::Redis uses Storable to (de)serialize session data. Seems like it's the Storable related problem. http://www.perlmonks.org/bare/?node_id=810341 Try to upgrade the Storable distribution which you use.

mfouilleul commented 11 years ago

Thanks for response.

My Storable module seems to be up to date (2.39).

I use JSON to serialize in my app (Serialyzer:"JSON" in config.yaml) do you think it could be the cause?

Info: i am using Perl 5.10

Wu-Wu commented 11 years ago

I don't think so. I've wrote simple test app. It uses both redis session and json serializer. See https://gist.github.com/Wu-Wu/5577823 Works like a charm. Just set REDIS_SERVER environment or change localhost:6379 to you redis server instance. I see serialized data like

{
   "this_session_id" : "70011428402058682062488454833275471",
   "counter" : "43",
   "message" : "the page was loaded #43"
}

I ran this gist under several versions of perls (5.10.1, 5.14.3, 5.16.3) with the same result.