Andrew Fletcher published: 11 April 2022 1 minute read
While working with lando, I had the following error
ERROR: for safs_appserver_1 UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=300)
ERROR: for safs_database_1 UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=300)
ERROR: for appserver UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=300)
ERROR: for database UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=300)
ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 300).
How to override the default value of COMPOSE_HTTP_TIMEOUT with docker-compose command?
For some, they were able to correct this issue by executing the following command:
COMPOSE_HTTP_TIMEOUT=500 docker-compose up
However, that wasn't the situation for me.
Instead, I found by altering the .env file in your site's root directory was successful. Edit the file, which I did via shell
vim .env
Run a find command in the file to cross check if it already exists. For me it didn't. So I added the line
COMPOSE_HTTP_TIMEOUT=500
As a change has been made to Docker composer file, I needed to restart Docker for the change to be recognised. Execute the following:
killall Docker && open /Applications/Docker.app
If the above fails, then try
pkill Docker
open -a /Applications/Docker.app
Once Docker has restarted, now rebuild lando.
lando rebuild
Related articles
Andrew Fletcher
•
19 Nov 2023
Lando - ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Lando is a local development environment tool, and it might not directly support the installation of system-wide packages like libGL. However, you can make sure that the required dependencies are included in your application's environment by modifying its configuration. Here's a general...
Andrew Fletcher
•
09 Nov 2023
Lando set-up running Drupal and Python
Lando is a development environment tool that makes it easier to set up and manage local development environments for web applications. To use Python within a Lando-based development environment, you can follow these general steps: Create a Lando Configuration FileMake sure you have a Lando...
Andrew Fletcher
•
22 Oct 2023
Lando setup running Drupal 10
Create a Lando setup running Drupal 10.The command you provided appears to be a Lando configuration command for initialising a new Lando environment for a Drupal 10 project. Following is a breakdown of the command and what it does:# Initialize a new lando drupal using a vanilla Drupal 10...