> ## Documentation Index
> Fetch the complete documentation index at: https://www.algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshoot Algolia for Django

> Fix connection and indexing errors in the algoliasearch-django package.

## Fix connection errors

If you see `Impossible to connect`, `Unable to connect`,
or `Unreachable hosts`, start with these checks:

* Compare the application ID and API key in your Django settings with the values in the [Algolia dashboard](https://dashboard.algolia.com/account/api-keys/all).
* Check for recent changes in your code.
* Check the status of your data center provider.

> [!NOTE]
>
> If you're using Firebase, you can only access Algolia from a paid Firebase tier.

If you can't solve the problem yourself,
contact the [Algolia support](https://support.algolia.com/hc/en-us/requests/new) team and provide them with the following information:

* The name of your [framework integration](https://www.algolia.com/doc/framework-integration.md) (Django) and its version number
* A code snippet to reproduce the issue
* Error message or stack trace (if applicable)
* The name of the Algolia index that's causing problems
* The exact [UTC time](https://wikipedia.org/wiki/Coordinated_Universal_Time) of the event
  If requests fail in your browser, run the [browser connection diagnostic](https://community.algolia.com/diag/) and include the result in your support request.

If requests fail from your Django server,  run the following command (on any affected server). Include the result in your support request.

```sh icon=square-terminal theme={"system"}
curl -sL https://algolia.com/downloads/diag.sh > ./diag.sh && sudo ./diag.sh ALGOLIA_APPLICATION_ID
```

Replace `ALGOLIA_APPLICATION_ID` with your Algolia application ID.

## Handle indexing errors

If Algolia returns `Record at the position XX objectID=XX is too big`,
the record exceeds your plan's [record size limit](https://support.algolia.com/hc/en-us/articles/4406981897617-Is-there-a-size-limit-for-my-index-records-).

Use `fields` in your `AlgoliaIndex` subclass to exclude model fields you don't need in the index,
then retry indexing.
