Description
Hi everyone,
I had encountered a problem recently.
When my server was trying to connect to the Redis Server, I made a mistake passing the SSL param to the string "False" rather than a boolean False param.
It prevented my server from receiving any requests.
When I tried to access http://localhost:8080 from a web browser or even try curl http://localhost:8080
, it did not receive any responses. The server did not raise any exceptions.
When I changed the SSL param from string to boolean, my server could receive the incoming requests.
I thought that the wrong string param I passed kept my server and Redis Server in an infinite loop without a timeout.
It blocked the main Django app thread. Therefore, the server could not receive any requests.
Here is my wrong config
REDIS = {
'tasks': {
'HOST': 'localhost',
'PORT': 6379,
'USERNAME': '',
'PASSWORD': '',
'DATABASE': 0,
'SSL': 'False', # False (bool) not 'False' string.
# Set this to True to skip TLS certificate verification
# This can expose the connection to attacks, be careful
# 'INSECURE_SKIP_TLS_VERIFY': False,
# Set a path to a certificate authority, typically used with a self signed certificate.
# 'CA_CERT_PATH': '/etc/ssl/certs/ca.crt',
}