PHPackages                             jenner/redis\_retry - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. jenner/redis\_retry

ActiveLibrary[API Development](/categories/api)

jenner/redis\_retry
===================

phpredis wrapper

v0.2.0(9y ago)4334MITPHPPHP &gt;=5.3.0

Since May 15Pushed 9y ago2 watchersCompare

[ Source](https://github.com/huyanping/RedisRetry)[ Packagist](https://packagist.org/packages/jenner/redis_retry)[ RSS](/packages/jenner-redis-retry/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

RedisRetry
==========

[](#redisretry)

[![Latest Stable Version](https://camo.githubusercontent.com/f88712bcf9a03ff4d2375b86a1624aa5397183e026f3dfc5453afa3cbf11d517/68747470733a2f2f706f7365722e707567782e6f72672f6a656e6e65722f72656469735f72657472792f762f737461626c65)](https://packagist.org/packages/jenner/redis_retry)[![Total Downloads](https://camo.githubusercontent.com/f302c056a25cee392925310584824848cf5303a24484262fe10628b6a8214baa/68747470733a2f2f706f7365722e707567782e6f72672f6a656e6e65722f72656469735f72657472792f646f776e6c6f616473)](https://packagist.org/packages/jenner/redis_retry)[![Latest Unstable Version](https://camo.githubusercontent.com/dc4f14c2fa37415c7da1ca88d960dcbe10889ccb8b3a0bbead4cc0175bda07fe/68747470733a2f2f706f7365722e707567782e6f72672f6a656e6e65722f72656469735f72657472792f762f756e737461626c65)](https://packagist.org/packages/jenner/redis_retry)[![License](https://camo.githubusercontent.com/a3196b976ec31d7929c7e92e390c8e39c1c68b4d5fbd3ad65de5fbf5f55bacbf/68747470733a2f2f706f7365722e707567782e6f72672f6a656e6e65722f72656469735f72657472792f6c6963656e7365)](https://packagist.org/packages/jenner/redis_retry)

A Redis wrapper which can retry to connect when the connection is closed by some reason. It will not affect other code. What you need to do is just adding 'use \\Jenner\\RedisRetry\\Redis' in your code where you use the \\Redis class.

here is an example:

```
$redis = new Redis();
$redis->connect('127.0.0.1', 6379);
$redis->select(1);
$redis->set('key', 'value');
```

add 'use \\Jenner\\RedisRetry\\Redis' to the top of this php file:

```
use \Jenner\RedisRetry\Redis;

$redis = new Redis();
$redis->connect('127.0.0.1', 6379);
$redis->select(1);
$redis->set('key', 'value');
```

When we are running a php daemon process, it's possible that our program can not connect to the redis-server or the connection might be close for some reason that we don't know. The RedisRetry will reconnect to the redis-server when the connection is failed.

You can define two const to control the times to retry and the time to sleep(wait to retry the connection).

- REDIS\_RETRY\_TIMES - The times to retry the connection.
- REDIS\_RETRY\_DELAY - The time to sleep

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~655 days

Total

2

Last Release

3366d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d132b55d12cd603f8cce9c152999e2b3f98748d56fe8a21adf62d5830d88d87?d=identicon)[huyanping](/maintainers/huyanping)

---

Top Contributors

[![white-poto](https://avatars.githubusercontent.com/u/4362540?v=4)](https://github.com/white-poto "white-poto (26 commits)")

---

Tags

apiwechat

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jenner-redis-retry/health.svg)

```
[![Health](https://phpackages.com/badges/jenner-redis-retry/health.svg)](https://phpackages.com/packages/jenner-redis-retry)
```

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.0k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
