#Restarting Redis

By
Fernando Cesar

first you need to connect to your instance in aws

ssh -i {key.pem} user@ip

Once you're connected, restarting Nginx is easy, just run this command:

sudo systemctl restart redis-server

If the command above didn’t work, you’ll need to take a few extra steps.

  1. First run the command

    sudo systemctl status redis-server

    The result of this command should look something like this:

    Loaded: {path to redis-server} Active: {active and date} Docs: {Link to redis doc} Main PID: {PID number} Status: {status of redis} Tasks: {number of tasks} Memory: {Memory usage and peak} CPU: {CPU uptime} CGroup: {CGroup}
  2. Copy the PID Number, then:

    sudo kill -9 {PID Number}

    The command above will force the Redis process to stop.

  3. Now, just run:

    sudo systemctl restart redis-server

    And Redis should be up and running again.