Score:0

Upstream timed out (110: Connection timed out)

us flag

I installed opigno_lms 8.x-2.9, I created a training and want to publish it. When I click "Publish", the site try to load for 60 seconds and then get "Error 504: Gateway time-out". In nginx error log: "[error] upstream timed out (110: Connection timed out) while reading response header from upstream"

I modified php.ini:

max_execution_time = 3600
max_input_time = 3600

and added below to nginx conf file, server context:

proxy_read_timeout 3600s;
proxy_connect_timeout 3600s;
proxy_send_timeout 3600s;

Also added below to druapl setting.php:

ini_set('max_execution_time', 3600);
ini_set('max_input_time', 3600);

But still the site try for 60 seconds and give same error. I think I'm missing a configuration somewhere that still effective and timeout the site connection in 60 seconds. Thanks to advice.

Site information:

  • Drupal version: 8.9.20
  • Installation profile: Opigno LMS (opigno_lms-8.x-2.29)
  • PHP version: 7.4.29
    • memory_limit = 512M
  • Web server: nginx/1.18.0
id flag
I m curious as to why you are testing an Opigno LMS version that is not supported by its maintainers.
Harish ST avatar
jp flag
Have you confirmed the PHP settings are updated?
us flag
I don't think this issue related to opigno lms in particular, but to answer your question, basically because the current opigno lms version is not working with me due to this [issue](https://www.drupal.org/project/opigno_lms/issues/3278953)
us flag
@HarishST: good question, yes I confirmed that using `phpinfo();`
cn flag
Try setting `fastcgi_send_timeout` and `fastcgi_read_timeout` along with the proxy settings (and restart/reload nginx). You may also/alternatively need to set `request_terminate_timeout` in PHP-FPM config
us flag
Thanks @Clive: it seems that original issue (error 504) resolved after adding `request_terminate_timeout = 0` in php-fpm pool config and ```fastcgi_connect_timeout 3600s; fastcgi_read_timeout 3600s; fastcgi_send_timeout 3600s``` in nginx config, server context. Now I'm getting `Error 524 A timeout occurred` which is related to CloudFlare which by default timeout after 100 seconds. I'll check what can be done with the new error.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.