mardi 23 avril 2019

I have a problem with storing large array in Laravel 5.6

Here is my problem.

I store array in Laravel session.

session(['array_cache' => $array]);

Array looks like this one:

array:59 [▼
  0 => array:18 [▼
    "id" => 2
    "type" => 3
    "partner_id" => 1
    "username" => "Pink11034519"
    "firstname" => "Jade"
    "lastname" => "Altenwerth"
    "age" => 18
    "gender" => "f"
    "email" => "brisa12@lubowitz.com"
    "mobile" => "406-361-6252 x4876"
    "rank_id" => 3
    "status" => 1
    "avatar" => ""
    "timezone" => "America/Anguilla"
    "available" => "7:00-11:30 | 13:00-17:00"
    "created_at" => "2018-08-28 02:56:26"
    "updated_at" => "2018-09-12 21:03:50"
    "pivot" => array:3 [▼
      "employee_id" => 1
      "storable_id" => 2
      "storable_type" => "Employee"
    ]
  ]
  1 => array:18 [▶]
  2 => array:18 [▶]
  3 => array:18 [▶]
  ....
  57 => array:18 [▶]
  58 => array:18 [▶]
]

When I store array like one above with more than 55 elements, session breaks and I get logged out.

If I decrease amount of data in subarrays, I am able to increase number of subarrays stored, before session breaks again.

So, it looks like size matters.

Are there any limits for array size stored in Laravel session?

Or maybe the problem is with Laravel auto serialization?

Anyone came across anything like this?

I appreciate some thoughts.



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2GCKo1Q
via IFTTT

Aucun commentaire:

Enregistrer un commentaire