ClientAbortException: EOF errors during tracker imports on DHIS2 2.40.4.1

Hi everyone,

I’m experiencing recurring errors on our DHIS2 production instance (version 2.40.4.1) running on Ubuntu with Tomcat 9. The errors occur during tracker event imports and appear to be related to client connection issues.

Environment:

  • DHIS2 Version: 2.40.4.1

  • Server: 1TB storage, 126GB RAM

  • Running 3 instances (prod, test, dev)

  • Tomcat 9.0.31

  • Spring Framework 5.3.37

Error Summary: The server logs show ClientAbortException: java.io.EOFException: Unexpected EOF read on the socket errors. These occur during JSON parsing of tracker imports, specifically when processing the “events” array (e.g., at element 74 in one case).

Stack Trace Key Points:
org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: java.io.EOFException: Unexpected EOF read on the socket (through reference chain: org.hisp.dhis.webapi.controller.tracker.imports.Body["events"]->java.util.ArrayList[74])

Caused by: org.apache.catalina.connector.ClientAbortException: java.io.EOFException: Unexpected EOF read on the socket

What I’ve Already Done:

  • Adjusted connection timeout settings in Apache2 (/etc/apache2/apache2.conf)

  • Modified Tomcat9 configuration (/etc/tomcat9/server.xml)

  • Updated DHIS2 settings (/opt/dhis2/dhis.conf)

  • Increased upload size limits and connection timeouts

  1. Has anyone experienced similar EOF exceptions during tracker imports?

  2. Could this be related to client-side issues (network instability, slow connections)?

  3. Are there specific Tomcat or DHIS2 configurations recommended for handling large tracker import payloads?

  4. Should I consider implementing request retry logic on the client side?

The errors seem to occur when clients are uploading larger event batches, and the connection drops before the complete payload is received by the server.

Any guidance or suggestions would be greatly appreciated!

Thanks in advance!

1 Like

Hi

Sorry to hear you’re facing an issue with tracker imports.

Could you update to the latest 2.40 version? (2.40.10)

To be on the safe side, using the same steps that you are doing would it work if you perform a tracker import that is not large? What I mean that if you test by following the same steps you use to import large tracker payloads, what happens if you try the same but smaller payload?

If smaller payload works then we know that the issue has to do with memory…etc if it doesn’t then we’re not focusing on what we’re supposed to focus. Any other errors, BTW?

Thanks!