# db-keep-alive

> Executes a keep-alive query on a database connection object every n seconds to keep it alive

Latest version **1.0.2** (published 2015-10-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install db-keep-alive
pnpm add db-keep-alive
yarn add db-keep-alive
bun add db-keep-alive
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-10-12 |
| First published | 2015-10-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jerko Steiner |
| Maintainers | jeremija |
| Keywords | db, keep, alive, mysql |

## Links

- npm: https://www.npmjs.com/package/db-keep-alive
- Repository: https://github.com/jeremija/db-keep-alive
- Homepage: https://github.com/jeremija/db-keep-alive#readme
- Issues: https://github.com/jeremija/db-keep-alive/issues
- npm.io page: https://npm.io/package/db-keep-alive

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [@temporal-architect/claude-plugin](https://npm.io/package/@temporal-architect/claude-plugin.md) — 335 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2015-10-12
- 1.0.1 — 2015-10-12
- 1.0.0 — 2015-10-12

## README

# db-keep-alive

Executes a keep-alive query through a database connection object every `n`
seconds. Tested with `mysql` module.

The default query is set to:

```
SELECT 1
```

# Usage

```javascript
// execute every 60 seconds
var pinger = require('db-keep-alive').create_pinger(connection, 60, 'SELECT 1');

// start the interval timeout
pinger.start();

// stop the interval timeout
pinger.stop();

// change the underlying connection and start
pinger.set_connection(connection2).start();
```

---
_Source: https://npm.io/package/db-keep-alive · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
