Laravel predis, Redis Cloud got error; `SELECT` failed: ERR DB index is out of range

I trying to cache all users into Redis. It worked well in local Redis when I try to set up with Redis cloud not worked anymore.

For setup, I followed these steps;

I subscribe Redis Cloud for a 30MB free subscription. added predis package to laravel project;

composer require predis/predis

after all, edited .env file according to the public endpoint and default user password ;

.env ;


Code ;

public function show()
        if (Cache::has('users')) {
            $data = Cache::get('users');
            return response()->json($data, 200);
        $data = User::all();
        Cache::put('users', $data, 40);
        return response()->json($data, 200);


Predis\Connection\ConnectionException: SELECT failed: ERR DB index is out of range [tcp://] in file C:\xampp\htdocs\redisPro\vendor\predis\predis\src\Connection\AbstractConnection.php on line 155