# Getting Cookie Overflow in rails application

**URL:** <https://www.ruby-forum.com/t/getting-cookie-overflow-in-rails-application/259366>\
**Category:** Deployment\
**Created:** [April 25, 2020, 6:12pm UTC](https://www.ruby-forum.com/t/getting-cookie-overflow-in-rails-application/259366 "2020-04-25T18:12:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![uttsap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/3e96dc/32.png) [@uttsap](https://www.ruby-forum.com/u/uttsap)\
**Post date:** [April 25, 2020, 6:12pm UTC](https://www.ruby-forum.com/t/getting-cookie-overflow-in-rails-application/259366/1 "2020-04-25T18:12:42Z")

</div>

```auto
ActionDispatch::Cookies::CookieOverflow (ActionDispatch::Cookies::CookieOverflow):
actionpack (4.2.8) lib/action_dispatch/middleware/cookies.rb:529:in `[]='

```

I am getting this error when hitting redmine rest api. The simple get api like url1 works fine but when it come to complex url as url2 the application throws cookie overflow.

```auto
url1: localhost:3000/issues.json?page=1&limit=100
url2: https://deerminetest.deerwalk.com/issues.json?key=292fe116d13d5f5db8a0e3f2b031f1e57ad1c882&f[]=project_id&op[project_id]=!&v[project_id][]=505&f[]=project_id&op[project_id]=!&v[project_id][]=478&f[]=project_id&op[project_id]=!&v[project_id][]=366&f[]=project_id&op[project_id]=!&v[project_id][]=419&f[]=project_id&op[project_id]=!&v[project_id][]=343&f[]=project_id&op[project_id]=!&v[project_id][]=345&f[]=project_id&op[project_id]=!&v[project_id][]=512&f[]=project_id&op[project_id]=!&v[project_id][]=487&f[]=project_id&op[project_id]=!&v[project_id][]=473&f[]=project_id&op[project_id]=!&v[project_id][]=509&f[]=project_id&op[project_id]=!&v[project_id][]=520&f[]=project_id&op[project_id]=!&v[project_id][]=404&f[]=project_id&op[project_id]=!&v[project_id][]=440&f[]=project_id&op[project_id]=!&v[project_id][]=389&f[]=project_id&op[project_id]=!&v[project_id][]=467&f[]=project_id&op[project_id]=!&v[project_id][]=501&f[]=project_id&op[project_id]=!&v[project_id][]=474&f[]=project_id&op[project_id]=!&v[project_id][]=471&f[]=project_id&op[project_id]=!&v[project_id][]=480&f[]=project_id&op[project_id]=!&v[project_id][]=507&f[]=project_id&op[project_id]=!&v[project_id][]=383&f[]=project_id&page=1&limit=100

```

I have not stored anything but username, cas ticket in session as:

```auto
 request.session['cas'] = { 'user' => user, 'ticket' => ticket, 'extra_attributes' => [] }

```

I have searched for the solution in many forums. All said donot save unnecessary data but all i am saving are username and cas ticket. When i print session this is the result:

```auto
puts(session.to_hash)

{"session_id"=>"fbe61cf9fd1c2ef0111d5d84a1a374c2", "cas"=>{"user"=>"user@gmail.com", "ticket"=>"ST-27189-R20MW7GBWaLWNJvl1aMi-localhost", "extra_attributes"=>[]}}

```

But when inspect session as below i get loads of gibberish data like below:

```auto
puts(session.inspect)

[result]: https://textsaver.flap.tv/lists/3caw "Click here for session.inspect output"

```

Since i am a newbie and just starting ruby on rails any suggestions will be highly appreciated. Thank You.
