Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

504 Timeout on Limesurvey Admin Page

  • cpoirier
  • cpoirier's Avatar Topic Author
  • Visitor
  • Visitor
4 years 5 months ago #191031 by cpoirier
504 Timeout on Limesurvey Admin Page was created by cpoirier
I am running LimeSurvey on a CentOS machine with nginx as the back end web server. When i attempt to log into the admin page, I intermittently am getting a 504 timeout. This eventually goes away after about 10 minutes when I refresh my browser, but I would like to solve this problem. Please let me know what you require in addition to the information below and I would be happy to provide it. Thank you!

[root@g48-limesurvey ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
[root@g48-limesurvey ~]#




[root@g48-limesurvey ~]# nginx -V
nginx version: nginx/1.16.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
built with OpenSSL 1.0.2k-fips 26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-stream_ssl_preread_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-http_auth_request_module --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'
[root@g48-limesurvey ~]#

[root@g48-limesurvey ~]# php-fpm -v

PHP 7.2.24 (fpm-fcgi) (built: Oct 26 2019 12:32:43)
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
[root@g48-limesurvey ~]#
The topic has been locked.
  • ollehar
  • ollehar's Avatar
  • Offline
  • LimeSurvey GmbH Employee
  • LimeSurvey GmbH Employee
More
4 years 5 months ago #191143 by ollehar
Replied by ollehar on topic 504 Timeout on Limesurvey Admin Page
Hi,

Do you know what happens on your server during those 10 minutes? Is there any outgoing traffic, like a call? Any messages in your nginx error log?
The topic has been locked.
  • cpoirier
  • cpoirier's Avatar Topic Author
  • Visitor
  • Visitor
4 years 5 months ago - 4 years 5 months ago #191146 by cpoirier
Replied by cpoirier on topic 504 Timeout on Limesurvey Admin Page
I am seeing the following when I run a tail -f on the /var/log/nginx/error.log this is all that comes up in the log when the "504 Gateway Time-Out" occurs. Now if I refresh the page, it will work.

[root@g48-limesurvey nginx]# tail -f error.log
2019/11/14 06:36:31 [error] 28206#0: *13502 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.26.145.16, server: g48-limesurvey, request: "GET /index.php?r=admin HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "g48-limesurvey", referrer: "https://g48-limesurvey/index.php?r=admin/authentication/sa/login"
2019/11/14 06:37:31 [error] 28206#0: *13502 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.26.145.16, server: g48-limesurvey, request: "GET /favicon.ico HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "g48-limesurvey"
Last edit: 4 years 5 months ago by cpoirier. Reason: updated info
The topic has been locked.
  • ollehar
  • ollehar's Avatar
  • Offline
  • LimeSurvey GmbH Employee
  • LimeSurvey GmbH Employee
More
4 years 5 months ago #191153 by ollehar
Replied by ollehar on topic 504 Timeout on Limesurvey Admin Page
fastcgi://127.0.0.1:9000 means that the problem is in PHP, that is, the LimeSurvey application. Someone suggested our ComfortUpdate check fails? I'm not sure how to disable it. Do you know PHP, can you hack the code?

stackoverflow.com/questions/18740635/ngi...reading-response-hea
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #191155 by holch
Replied by holch on topic 504 Timeout on Limesurvey Admin Page
Wasn't the Limesurvey Comfort Update check problem resolved in the more recent versions?

What Limesurvey Version is used?

And, if I recall right, there was an option to prevent the comfort update check in the config file, back in the day, if I recall right.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • cpoirier
  • cpoirier's Avatar Topic Author
  • Visitor
  • Visitor
4 years 5 months ago #191157 by cpoirier
Replied by cpoirier on topic 504 Timeout on Limesurvey Admin Page
Unfortunately, I do not know PHP well enough to do that. That makes sense because when I attempt to go into settings for ComfortUpdate, the web application hangs with a 504 timeout as well. Is there a way to disable this (in the PostgreSQL database, etc.)?
The topic has been locked.
  • cpoirier
  • cpoirier's Avatar Topic Author
  • Visitor
  • Visitor
4 years 5 months ago #191158 by cpoirier
Replied by cpoirier on topic 504 Timeout on Limesurvey Admin Page
LimeSurvey version information is as follows:

LimeSurvey
Version 3.19.3+191023
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago - 4 years 5 months ago #191167 by holch
Replied by holch on topic 504 Timeout on Limesurvey Admin Page
As mentioned before, there was a time where ComfortUpdate would cause long login times when the installation could not access the internet (e.g. because it is used offline or because the connection is filtered by a firewall, etc.).

As far as I know, these problems have been solved a while ago, so in theory your version should be fine. But maybe the problem made it back into the source code.

Here an old article on how to switch off the Comfort Update check:
survey-consulting.com/how-to-disable-the...ature-at-limesurvey/
Also here from the manual:
manual.limesurvey.org/ComfortUpdate

Give it a try and see if things improve.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 4 years 5 months ago by holch.
The topic has been locked.
  • cpoirier
  • cpoirier's Avatar Topic Author
  • Visitor
  • Visitor
4 years 5 months ago #191169 by cpoirier
Replied by cpoirier on topic 504 Timeout on Limesurvey Admin Page
That worked! Thank you so much for all of your help with this!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #191171 by holch
Replied by holch on topic 504 Timeout on Limesurvey Admin Page
Great to know it worked, not so great to know that this is still a thing...

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
4 years 5 months ago #191175 by jelo
Replied by jelo on topic 504 Timeout on Limesurvey Admin Page

holch wrote: As far as I know, these problems have been solved a while ago, so in theory your version should be fine. But maybe the problem made it back into the source code.

To force an server check via every login is not nature given. It was the choice by the developers.
I don't remember any fix around the timeout/blocking during login.
Publishing the config setting to disable the check is the only fix I'm aware of.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #191178 by holch
Replied by holch on topic 504 Timeout on Limesurvey Admin Page

Publishing the config setting to disable the check is the only fix I'm aware of.

Maybe. I thought they had solved it back then, but I might remember wrong.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose