DICOM file upload failed with 504 Gateway Time-out error in XNAT

137 views
Skip to first unread message

Ruba

unread,
May 14, 2021, 7:07:50 AM5/14/21
to xnat_discussion
Hi,

I am trying to upload DICOM zip files with XNATpy using following codes:

session = xnat.connect(server='', user='', password='')
session.services.import_(FileToUpload, project=projectName, subject=subID, experiment=exID)
session.disconnect()


But I am always getting this error if the file size is large :
xnat.exceptions.XNATUploadError: Upload failed after 1 attempts! Status code 504, response text <html>

Should I try to change the nginx configuration in this path: /etc/nginx/sites-available/xnat ? If yes, which part?

Can anyone please confirm this? I am not sure if this will solve the problem.
I will appreciate any advice regarding this.

Thanks,
Ruba



Herrick, Rick

unread,
May 17, 2021, 11:43:26 AM5/17/21
to xnat_di...@googlegroups.com

Not sure if it will solve the problem BUT! This is definitely the place to start.

 

In your nginx configuration, add the following settings:

 

proxy_connect_timeout       600;

proxy_send_timeout          600;

proxy_read_timeout          600;

send_timeout                600;

 

You’ll need to restart nginx for these changes to take effect. You can play around with these settings and they may not all be necessary, but, again, this is a good place to start.

 

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

Phone: +1 (314) 273-1645

 

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Ruba <rubaida...@gmail.com>
Date: Friday, May 14, 2021 at 6:07 AM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] DICOM file upload failed with 504 Gateway Time-out error in XNAT

* External Email - Caution *

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/eb413ccc-b92d-48b4-90e6-24fae50afd72n%40googlegroups.com.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Ruba

unread,
May 18, 2021, 5:10:50 AM5/18/21
to xnat_discussion
Hello Rick,

Thanks a lot for the suggestion. 
It worked.

Best wishes,
Ruba


Reply all
Reply to author
Forward
0 new messages