import certifi
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from elasticsearch_dsl.connections import connections


class DocsConfig(AppConfig):
    name = 'docs'
    verbose_name = _('Documentation')

    def ready(self):
        super(DocsConfig, self).ready()
        # Configure Elasticsearch connections for connection pooling.
        connections.configure(
            default={
                'hosts': settings.ES_HOST,
                'verify_certs': True,
                'ca_certs': certifi.where(),
            },
        )

import certifi
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from elasticsearch_dsl.connections import connections


class DocsConfig(AppConfig):
    name = 'docs'
    verbose_name = _('Documentation')

    def ready(self):
        super(DocsConfig, self).ready()
        # Configure Elasticsearch connections for connection pooling.
        connections.configure(
            default={
                'hosts': settings.ES_HOST,
                'verify_certs': True,
                'ca_certs': certifi.where(),
                'timeout': 60.0,
            },
        )

Increase the ES timeout to 1 minute.
Increase the ES timeout to 1 minute.

  import certifi
  from django.apps import AppConfig
  from django.conf import settings
  from django.utils.translation import ugettext_lazy as _
  from elasticsearch_dsl.connections import connections
  
  
  class DocsConfig(AppConfig):
      name = 'docs'
      verbose_name = _('Documentation')
  
      def ready(self):
          super(DocsConfig, self).ready()
          # Configure Elasticsearch connections for connection pooling.
          connections.configure(
              default={
                  'hosts': settings.ES_HOST,
                  'verify_certs': True,
                  'ca_certs': certifi.where(),
+                 'timeout': 60.0,
              },
          )
  
Increase the ES timeout to 1 minute.
## Code Before:
import certifi
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from elasticsearch_dsl.connections import connections


class DocsConfig(AppConfig):
    name = 'docs'
    verbose_name = _('Documentation')

    def ready(self):
        super(DocsConfig, self).ready()
        # Configure Elasticsearch connections for connection pooling.
        connections.configure(
            default={
                'hosts': settings.ES_HOST,
                'verify_certs': True,
                'ca_certs': certifi.where(),
            },
        )

## Instruction:
Increase the ES timeout to 1 minute.
## Code After:
import certifi
from django.apps import AppConfig
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from elasticsearch_dsl.connections import connections


class DocsConfig(AppConfig):
    name = 'docs'
    verbose_name = _('Documentation')

    def ready(self):
        super(DocsConfig, self).ready()
        # Configure Elasticsearch connections for connection pooling.
        connections.configure(
            default={
                'hosts': settings.ES_HOST,
                'verify_certs': True,
                'ca_certs': certifi.where(),
                'timeout': 60.0,
            },
        )
