ODK Central - ConnectionError: timeout and 500 errors

1. What is the problem? Be very detailed.

  • Something went wrong: error code 500 on login screen.
  • Previously getting Knex timeout issues, but not seen again since update to v1.2.
  • Server has been running fine for a week since the update.
  • Service log showing timeout and HTTP 500 errors (see below)

2. What app or server are you using and on what device and operating system? Include version numbers.
ODK Central 1.2 self-hosted on Ubuntu 20.04. 16GB RAM

3. What you have you tried to fix the problem?
Reboot!

4. What steps can we take to reproduce the problem?
Haven't been able to reproduce.
Issue looks superficially similar to this. There will be a number of people uploading encrypted forms.

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
Service log snippet:

service_1 | ::ffff:172.18.0.9 - - [02/Jun/2021:14:09:37 +0000] "GET /v1/projects/19/forms HTTP/1.0" 200 11631
service_1 | ::ffff:172.18.0.9 - ***@***.*** [02/Jun/2021:14:09:38 +0000] "POST /v1/projects/19/forms/Infos_registre_CTC_20210226/submissions.csv.zip HTTP/1.0" 200 -
service_1 | ::ffff:172.18.0.9 - ***@***.*** [02/Jun/2021:14:09:39 +0000] "GET /v1/projects/19/forms/Resultats_Confirmation_20210226/submissions/keys HTTP/1.0" 200 521
service_1 | ConnectionError: timeout exceeded when trying to connect
service_1 |     at Object.createConnection (/usr/odk/node_modules/slonik/dist/src/factories/createConnection.js:54:23)ConnectionError: timeout exceeded when trying to connect
service_1 |     at Object.createConnection (/usr/odk/node_modules/slonik/dist/src/factories/createConnection.js:54:23)ConnectionError: timeout exceeded when trying to connect
service_1 | ::ffff:172.18.0.9 - ***@***.*** [02/Jun/2021:14:09:49 +0000] "POST /v1/projects/19/forms/Resultats_Confirmation_20210226/submissions.csv.zip HTTP/1.0" 500 271
service_1 | ::ffff:172.18.0.9 - ***@***.*** [02/Jun/2021:14:09:53 +0000] "POST /v1/projects/19/forms/Resultats_Confirmation_20210226/submissions.csv.zip HTTP/1.0" 200 -
service_1 |     at Object.createConnection (/usr/odk/node_modules/slonik/dist/src/factories/createConnection.js:54:23)(node:58) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Many thanks for any help.

Very interesting that the server has been running fine for a week. Has anything changed in the last week? Maybe with the database (which I'm assuming is hosted on another machine)?

No - nothing has changed since the 1.2 update a week ago. Database is the regular Postgres Docker container - very standard installation, all running on the one machine.

1 Like

Do you know for sure if anyone has tried to login since your update? When you say the server was running fine, how did you determine that?

The first timeout error appears on line 17656 of the Service log - plenty of activity in the previous week :slight_smile:

I've attached the full Service log
I restarted the server at 07:52 this morning - around line 18683

A post was split to a new topic: 500 error code issues with an ODK Central server v1.2.1

This response was a little vague, so I wanted to double check. Are you using the PostgreSQL 9.6 database that comes bundled with Central (https://github.com/getodk/central/blob/master/docker-compose.yml#L3) or are you using another Docker PostgreSQL database that happens to be on the same machine.

My guess is that you aren't using the bundled database and that the performance of (or connection to, or configuration of) the non-bundled PostgreSQL is not ideal.