← Back to team overview

dhis2-devs team mailing list archive

Re: Events API - content length mismatch

 

Hi, nothing in the DHIS logs, but in the nginx log: turned out I had wrong permissions on  "…/nginx/proxy_temp/" for some reason. Never noticed any issues caused by that before, but fixing permissions solved this issue.

Thanks!

Olav


> 18. feb. 2016 kl. 09.40 skrev Morten Olav Hansen <morten@xxxxxxxxx>:
> 
> Yeah, it sounds weird.. 2mb is not a big payload, is there anything in the server logs?
> 
> On Thu, Feb 18, 2016 at 3:15 PM, Olav Poppe <olav.poppe@xxxxxx> wrote:
>> Thanks both. I guess I will use paging, but I assume it should not be like this..? The total size would be about 2 Mb (last attempt I got about 475 of the events in 1,3 Mb).
>> 
>> Olav
>> 
>> 
>> 
>>> 18. feb. 2016 kl. 09.02 skrev Morten Olav Hansen <morten@xxxxxxxxx>:
>>> 
>>> Hm, never seen that either.. do you have any idea of how much data it could be? do you have a very large number of data values for each event? if you are running this from a node js script, why not just use paging, and do multiple requests.. should be easy enough to do
>>> 
>>> On Thu, Feb 18, 2016 at 2:57 PM, Pierre Dane <pierre@xxxxxxxxx> wrote:
>>>> hey
>>>> 
>>>> I haven't run into this but you may have to page:( or you could try a sqlview which won't have a size restriction (you would have to use a function as tracker events can't be accessed with raw sql). 
>>>> 
>>>> 
>>>>> On Thursday, 18 February 2016, Olav Poppe <olav.poppe@xxxxxx> wrote:
>>>>> Hi devs, 
>>>>> I’m trying to fetch events from the API (DHIS 2.22 build 21829). For a small number of events, everything works fine. However, for larger datasets, it fails to load the full "events" object. 
>>>>> 
>>>>> This is the request (should return about 700 events):
>>>>> api/events.json?orgUnit=M4nRM5O3mH8&ouMode=DESCENDANTS&programStage=wmSb9TmevMn&startDate=2013-02-17&endDate=2016-02-17&status=COMPLETED&skipPaging=true
>>>>> 
>>>>> These are the error messages:
>>>>> Chrome: "ERR_CONTENT_LENGTH_MISMATCH"
>>>>> Curl: curl: (18) transfer closed with 1557104 bytes remaining to read
>>>>> node.js request.get: simply loads the first part of the events object as a string
>>>>> 
>>>>> Any advice?
>>>>> 
>>>>> Olav
>>>> 
>>>> 
>>>> -- 
>>>> Pierre Dane
>>>> 
>>>> Jembi Health Systems
>>>> Software Development Manager
>>>> tel: +27 (0)21 701 0939
>>>> cel: +27 (0)83 680 8274
>>>> email: pierre@xxxxxxxxx
>>>> web: www.jembi.org
>>>> 
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>> 
>>> 
>>> 
>>> -- 
>>> Morten
> 
> 
> 
> -- 
> Morten


Follow ups

References