JATOS POST failed
Hi everyone,
I'm developing a study with JATOS (the latest docker image 3.6.1) and nginx as a proxy server. The frontend is written with React and several video recordings have to be uploaded to JATOS. Everything works fine except that the largest video sometimes doesn't get uploaded. It's 7-10mb. Even if it gets successfully uploaded there always are some failed attempts to upload it. This is the console and network output of the dev tools:
The nginx config looks like this:
At the end of the http-block there are some other files included, especially this:
Probably there's something wrong with the nginx or JATOS configuration, but I couldn't fix it. The jatos configuration is the standard one from the docker image.
Do you have any ideas how to solve this?
I also attached the corresponding error log of nginx.
Thanks for your help in advance!
Comments
Hi,
I see from your screenshots you are using
jatos.uploadResultFile. By default JATOS has a limit of 30 MB for file uploads but this can be changed in the production.conf. So file size shouldn't be your problem if your files are max 7-10 MB. But I see in the screenshots that your POSTs got a timeout. Maybe the cause is simply that your Nginx' timeouts are too low. Try e.g. 300 seconds:location / { proxy_pass http://jatos-backend; proxy_connect_timeout 300; proxy_send_timeout 300; proxy_read_timeout 300; send_timeout 300; }Hope this helps,
Kristian
Hi,
sorry for the late response and thanks for the suggestion! It seems to work. There are still some failed attempts to upload the videos and some retries, but after a maximum of 2 retries it's always uploaded.
In my old configuration the proxy-timeouts were already set to 7d but I set them to 300 as you suggested. I believe that the send_timeout at 300 made the difference here. Maybe I'll have to play around with the values a bit to see if I can eliminate the failed attempts altogether.
Thanks again!
Weird, one would think 7 days is greater than 300 seconds. Maybe there is/was another proxy/gateway that causes the timeouts?
Hi, I have a follow up question regarding the failed POST requests: I am now uploading even bigger files (20-30mb) and the upload always works, but the console still shows me that the POST requests fail (I am logging the response). Looking at the network tab in the devtools also shows that theres no success with the POST request. This behavior must also have been present when the videos were smaller, I think. I can already see the file in the JATOS-GUI and download it. But at that point the console still shows that the POST request failed and that theres a retry to post it - again and again until the timeout happens.
This is a problem for me because I want to check in the frontend whether the videos are uploaded (by working with the response) and indicate to the user to wait while the upload is not finished.
Any ideas on this?
Does this problem still occur in the new version 3.7.1 (e.g. you can test on jatos.mindprobe.eu)?
Hey,
sorry for the late comment. I am writing for stejo. We're still having this issue. Sometimes videos get uploaded (after some timeouts) and sometimes not. The console still shows that the POST request failed and that theres a retry to post it - again and again until the timeout happens. Any news on this?