# 500 Internal Server Error: server failed on a valid request

> The remote server failed while handling a valid request. Retry once or twice, then check status and support; nothing in your SQL is wrong.

Source: https://sqlly.app/errors/libsql/internal-server-error-500
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).
Note: Quoted error message text belongs to its database vendor.

- Error: `500 Internal Server Error`
- Category: Remote server and Hrana errors

Error message:

```text
Server returned HTTP status 500 Internal Server Error
```

## What it means

A 500 means the server itself failed: an internal error in sqld or the platform, not a client mistake. It is rare and usually transient. Repeated 500s on the same statement can point at a server bug or a corrupt state on that database.

## Common causes

- A transient internal failure on the server or platform.
- A server bug triggered by a particular statement or load.
- A server restart or failover mid-request.

## How to fix it

1. Retry the request after a short wait:
2. If it repeats on the same statement, simplify the statement to isolate the trigger and report it to Turso support or the libsql GitHub issues with the statement and timestamp.
3. Check platform status for an ongoing incident.

## Reproduce it safely

```sql
There is no honest offline repro: killing `turso dev` mid-request yields a connection error, not a 500. A real 500 needs a server bug or platform incident, which is exactly why the retry-then-report procedure matters.
```

## How SQLly helps

SQLly retries nothing behind your back: a 500 lands in the result pane with the server's message, so you can rerun it yourself once and decide from there.

## Questions

### Is a 500 from Turso my fault?

No. A 500 means the server failed while handling a valid request. Retry once or twice; repeated 500s on the same statement are worth isolating and reporting.

### What should I include when reporting a Turso 500?

The exact statement, the timestamp, the database and region, and whether a retry with the same statement succeeded. That separates a server bug from a transient platform failure.

## Related errors

- [`connection reset / interrupted`](https://sqlly.app/errors/libsql/connection-interrupted): Connection reset or dropped
- [`429 Too Many Requests`](https://sqlly.app/errors/libsql/rate-limited-429): request rate limit hit
- [`Error in remote response`](https://sqlly.app/errors/libsql/error-in-remote-response): Error in remote response

The code and message text are from the [libSQL / Turso documentation](https://docs.turso.tech/).
