0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

LaravelでMISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk.が出た

Posted at

発生したエラー

MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk.

環境

Laravel 5.6
PHP 7.1
ローカル環境です。

何が起きたか

ローカルで開発中に、redisのエラーが発生したようです。
詳細な原因は不明で、決済処理か何かをローカルで実施して失敗後に発生した。

エラーハンドリングされたコード

/vendor/predis/predis/src/Client.php

    /**
     * Handles -ERR responses returned by Redis.
     *
     * @param CommandInterface       $command  Redis command that generated the error.
     * @param ErrorResponseInterface $response Instance of the error response.
     *
     * @throws ServerException
     *
     * @return mixed
     */
    protected function onErrorResponse(CommandInterface $command, ErrorResponseInterface $response)
    {
        if ($command instanceof ScriptCommand && $response->getErrorType() === 'NOSCRIPT') {
            $eval = $this->createCommand('EVAL');
            $eval->setRawArguments($command->getEvalArguments());

            $response = $this->executeCommand($eval);

            if (!$response instanceof ResponseInterface) {
                $response = $command->parseResponse($response);
            }

            return $response;
        }

        if ($this->options->exceptions) {
            // ここのthrowの処理に入った
            throw new ServerException($response->getMessage());
        }

        return $response;
    }

対応

PC自体を再起動したらエラーが消えていました。

Laravelの再起動(php artisan serve をやり直した)では解決できませんでした。
なお、Laravelのtinkerでキャッシュクリアの方法はわからず試していません。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?