{"action":"created","issue":{"url":"https://api.github.com/repos/petergoldstein/dalli/issues/529","labels_url":"https://api.github.com/repos/petergoldstein/dalli/issues/529/labels{/name}","comments_url":"https://api.github.com/repos/petergoldstein/dalli/issues/529/comments","events_url":"https://api.github.com/repos/petergoldstein/dalli/issues/529/events","html_url":"https://github.com/petergoldstein/dalli/issues/529","id":66145537,"number":529,"title":"Unexpected exception in Dalli: ArgumentError: string contains null byte","user":{"login":"ErGisler","id":10442193,"avatar_url":"https://avatars.githubusercontent.com/u/10442193?v=3","gravatar_id":"","url":"https://api.github.com/users/ErGisler","html_url":"https://github.com/ErGisler","followers_url":"https://api.github.com/users/ErGisler/followers","following_url":"https://api.github.com/users/ErGisler/following{/other_user}","gists_url":"https://api.github.com/users/ErGisler/gists{/gist_id}","starred_url":"https://api.github.com/users/ErGisler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErGisler/subscriptions","organizations_url":"https://api.github.com/users/ErGisler/orgs","repos_url":"https://api.github.com/users/ErGisler/repos","events_url":"https://api.github.com/users/ErGisler/events{/privacy}","received_events_url":"https://api.github.com/users/ErGisler/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-03T13:21:07Z","updated_at":"2015-12-16T10:27:50Z","closed_at":"2015-12-16T10:27:49Z","body":"Hello,\r\n\r\nI got a problem with Dalli 2.7.2, memcached 1.4.4\r\n\r\n```\r\nThis is a bug in Dalli, please enter an issue in Github if it does not already exist.\r\n/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/core_ext/marshal.rb:6:in `_load'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/core_ext/marshal.rb:6:in `load'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/core_ext/marshal.rb:6:in `load_with_autoloading'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/dalli-2.7.2/lib/dalli/server.rb:424:in `deserialize'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/dalli-2.7.2/lib/dalli/server.rb:488:in `generic_response'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/dalli-2.7.2/lib/dalli/server.rb:257:in `get'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/dalli-2.7.2/lib/dalli/server.rb:60:in `request'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/dalli-2.7.2/lib/dalli/options.rb:18:in `block in request'\r\n\t/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/dalli-2.7.2/lib/dalli/options.rb:17:in `request'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/dalli-2.7.2/lib/dalli/client.rb:329:in `perform'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/dalli-2.7.2/lib/dalli/client.rb:53:in `get'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/dalli-2.7.2/lib/rack/session/dalli.rb:31:in `block in get_session'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/dalli-2.7.2/lib/rack/session/dalli.rb:61:in `with_lock'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/dalli-2.7.2/lib/rack/session/dalli.rb:30:in `get_session'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:266:in `load_session'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/middleware/session/abstract_store.rb:43:in `block in load_session'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/middleware/session/abstract_store.rb:51:in `stale_session_check!'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/middleware/session/abstract_store.rb:43:in `load_session'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/request/session.rb:168:in `load!'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/request/session.rb:164:in `load_for_write!'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/request/session.rb:106:in `[]='\r\n\t/home/m2/app/controllers/application_controller.rb:141:in `set_charset'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:387:in `_run__2665950635715412744__process_action__callbacks'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80:in `run_callbacks'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/abstract_controller/callbacks.rb:17:in `process_action'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_controller/metal/rescue.rb:29:in `process_action'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `block in instrument'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_controller/metal/instrumentation.rb:30:in `process_action'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activerecord-4.0.0/lib/active_record/railties/controller_runtime.rb:18:in `process_action'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/abstract_controller/base.rb:136:in `process'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/abstract_controller/rendering.rb:44:in `process'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/session_off-0.5.0/lib/session_off.rb:176:in `process_with_session_off'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_controller/metal.rb:195:in `dispatch'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_controller/metal.rb:231:in `block in action'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:80:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:80:in `dispatch'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:48:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:71:in `block in call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:59:in `each'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:59:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:655:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/middleware/params_parser.rb:27:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/middleware/flash.rb:241:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/middleware/cookies.rb:486:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activerecord-4.0.0/lib/active_record/query_cache.rb:36:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:373:in `_run__1029456427082247305__call__callbacks'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80:in `run_callbacks'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/railties-4.0.0/lib/rails/rack/logger.rb:38:in `call_app'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/railties-4.0.0/lib/rails/rack/logger.rb:21:in `block in call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67:in `block in tagged'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:25:in `tagged'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67:in `tagged'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/railties-4.0.0/lib/rails/rack/logger.rb:21:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activesupport-4.0.0/lib/active_support/cache/strategy/local_cache.rb:83:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/actionpack-4.0.0/lib/action_dispatch/middleware/static.rb:64:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/railties-4.0.0/lib/rails/application.rb:97:in `call'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/passenger-4.0.14/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/passenger-4.0.14/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/passenger-4.0.14/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'\r\n\t/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/passenger-4.0.14/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'\r\nlocalhost:11211 is down\r\n#<Dalli::NetworkError: localhost:11211 is down: ArgumentError string contains null byte>\r\nretrying request with new server\r\ndown_retry_delay not reached for localhost:11211 (1.000 seconds left)\r\n```\r\n\r\nThis happened only when one particular page was being loaded.\r\nIt was trying to access **session[:some_value] = 0 if session**\r\n\r\nBut after using\r\n```\r\n$ memcached restart\r\n```\r\nFixed the issue. But I believe that this is just a matter of time, when it will reproduce."},"comment":{"url":"https://api.github.com/repos/petergoldstein/dalli/issues/comments/165058996","html_url":"https://github.com/petergoldstein/dalli/issues/529#issuecomment-165058996","issue_url":"https://api.github.com/repos/petergoldstein/dalli/issues/529","id":165058996,"user":{"login":"petergoldstein","id":421488,"avatar_url":"https://avatars.githubusercontent.com/u/421488?v=3","gravatar_id":"","url":"https://api.github.com/users/petergoldstein","html_url":"https://github.com/petergoldstein","followers_url":"https://api.github.com/users/petergoldstein/followers","following_url":"https://api.github.com/users/petergoldstein/following{/other_user}","gists_url":"https://api.github.com/users/petergoldstein/gists{/gist_id}","starred_url":"https://api.github.com/users/petergoldstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petergoldstein/subscriptions","organizations_url":"https://api.github.com/users/petergoldstein/orgs","repos_url":"https://api.github.com/users/petergoldstein/repos","events_url":"https://api.github.com/users/petergoldstein/events{/privacy}","received_events_url":"https://api.github.com/users/petergoldstein/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T10:27:49Z","updated_at":"2015-12-16T10:27:49Z","body":"Given this issue isn't recurring, and hasn't been reported by anyone else, I'm going to close the issue."}}