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?

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: - - [02/Jun/2021:14:09:37 +0000] "GET /v1/projects/19/forms HTTP/1.0" 200 11631
service_1 | ::ffff: - ***@***.*** [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: - ***@***.*** [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: - ***@***.*** [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: - ***@***.*** [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.

Apologies if it wasn't clear, but to confirm we're using the default PostgreSQL container that comes bundled with Central. Apart from using a third party SSL cert, it's a completely standard installation.

There was nothing to suggest any performance issues or spikes on the host. On a positive note, there haven't been any issues since.

Yet to update to 1.2.1

1 Like

So to confirm this problem has magically solved itself?

I think I would rather say that we've only seen it once and that it hasn't recurred... :smiley:

Either way, I'll consider this issue solved until I hear otherwise from you or anyone else :slight_smile:

1 Like

I am having the same issue. It was automatically throwing up when i have used rUODK library with R and subsequently requested for submission data. The submission list is up to 100 in around 3 forms. But after that the error starts occurring and now i am unable to login in to dashboard and the same error is throwing up in R console. Should i stop and start the docker container?

I am having the timeout error for login request from the dashboard UI also.

Following is docker status

RAM and CPU is also almost idle.

Did you get any solution for this issue??. I get same issue today.


If the error is reproducible in Central, it's likely not a bug in ruODK.
Can you create a new support post with more details, e.g. versions, server logs, and anything unusual about your server (e.g., upgrade from very old versions, or many forms, or many form versions, etc)

1 Like