Having Time out error loading forms

We are facing gateway time out error while previewing form.


This is the env


In odk collect app too the form is not coming up , we suspect there is some issue with enketo.

This runs latest odk central 2023 v2.

Form XML

<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:orx="http://openrosa.org/xforms" xmlns:odk="http://www.opendatakit.org/xforms">


        <h:title>GPS location</h:title>



                <data id="GPS-location" version="1666073709">










                <translation lang="English">

                    <text id="/data/location_default:label">



                    <text id="/data/locationshowmap:label">



                    <text id="/data/video:label">





            <bind nodeset="/data/meta/instanceID" type="string" readonly="true()" jr:preload="uid"/>

            <bind nodeset="/data/location_default" type="geopoint" required="true()"/>

            <bind nodeset="/data/locationshowmap" type="geopoint" required="true()"/>

            <bind nodeset="/data/video" type="binary" required="true()"/>




        <input ref="/data/location_default">

            <label ref="jr:itext('/data/location_default:label')"/>


        <input ref="/data/locationshowmap" appearance="maps">

            <label ref="jr:itext('/data/locationshowmap:label')"/>


        <upload ref="/data/video" mediatype="video/*">

            <label ref="jr:itext('/data/video:label')"/>




We have looked at the docker logs. And the POST request times out with the following error message. Looks like this is something to do with routing the POSt request?

*2071 upstream timed out (110: Connection timed out) while reading response header from upstream, client:, server: odk.staging.eastafricacoffee.org, request: "POST /-/transform/xform/JfzpocQZvwXhVw25H6Q6QzNjkxwyhl4 HTTP/1.1", upstream: "", host: "odk.staging.eastafricacoffee.org", referrer: "https://odk.staging.eastafricacoffee.org/-/preview/JfzpocQZvwXhVw25H6Q6QzNjkxwyhl4"

As noted in .env.template...

  • The domain should be odk.staging.eastafricacoffee.org not https://odk.staging.eastafricacoffee.org/#/.
  • If you are using a self-signed cert, DOMAIN should be local.

Try fix that and rebuilding with docker compose build && docker compose up -d.

Thanks for the advise.
Now I get a 404
Does enketo have logs we can look it?
This problem happened after we upgraded to the latest with postgres 14 - - [28/May/2023:01:53:14 +0000] "POST /-/transform/xform/wV6p8TpSdyMAdQllxM7ZJVpvRJ7R80G HTTP/1.1" 404 343 "https://odk.staging.eastafricacoffee.org/-/preview/wV6p8TpSdyMAdQllxM7ZJVpvRJ7R80G"

I think form previews are keyed to the domain and you just changed yours. Try downloading the form definition, increasing the form version, re-uploading the form for publication.