curl: (52) Empty reply from server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting curl: (52) Empty reply from server
# 1  
Old 07-17-2012
curl: (52) Empty reply from server

Hi All,

I am using curl command to issue a request to server(web.py). Till Now I was not facing any problem. But when the server takes lot of time to respond, Curl exits with "curl: (52) Empty reply from server" error.



Code:
  0     0    0     0    0     0      0      0 --:--:--  0:04:57 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:04:58 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:04:59 --:--:--     0* Empty reply from server

  0     0    0     0    0     0      0      0 --:--:--  0:05:00 --:--:--     0* Connection #0 to host proxy.xxx.xxx.xxx.xxx left intact

Curl is exiting after default time-out.

How can curl get notified from the server in case of late response from server??


Thanks !!!!

Last edited by Scott; 07-17-2012 at 03:49 AM.. Reason: Code tags
# 2  
Old 07-17-2012
Perhaps there's an option to increase the connection timeout?

Code:
--connect-timeout <seconds>
              Maximum  time in seconds that you allow the connection to the server to take.  This only limits the con-
              nection phase, once curl has connected this option is of no more use. See also the -m/--max-time option.

              If this option is used several times, the last one will be used.

It usually shouldn't take that long to connect to a server. Perhaps you could test first with a time-limited ping if the server is responding.
# 3  
Old 07-17-2012
Dear Scott,

Thanks for the response!!!! But the solution will not solve my purpose as the connection is already established with the server(Connection establishment doesnt take lot of time !!!).. Processing time of server takes lot of time...

I have also used this option also along with Curl

-m, --max-time <seconds>

Maximum time in seconds that you allow the whole operation to take. This is useful for preventing your batch jobs from hanging for hours due to slow networks or links going down. See also the --connect-timeout option.

If this option is used several times, the last one will be used.


But due to some reason. It doesn't work for me Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to perform checksum of a file on remote server using Curl?

Hi, We have an AIX server and have CURL 7.40 installed in it. We are struggling to perform checksum on the file present on the remote server (AWS). We want to validate the checksum on the file pre and post download to make sure that there is no issue with the file. We are writing a shell... (0 Replies)
Discussion started by: Sanjay_13
0 Replies

2. Shell Programming and Scripting

Curl - upload multiple attachment arrays to server webpage

The html page of the form data is as below <form name="uploadform" id="uploadform" action="htmlupload.php" enctype="multipart/form-data" method="post"> <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center"> <tr> <td class="tcat"> Upload Files ... (0 Replies)
Discussion started by: jaango123
0 Replies

3. Shell Programming and Scripting

How can I check, if on remote server directory is empty or have files?

I have a script, which is supposed to run 1 day of the month, connect to remote server certain directory, find files, tar the, and copy find . -ctime -1 | tar -cvf transfer_dmz_start_monthly.tar *${Today}*.*; if then echo "Cannot create a tar file, the terminated... (2 Replies)
Discussion started by: digioleg54
2 Replies

4. UNIX for Advanced & Expert Users

Empty lines at the end of the payload generated in FTP server

Hi All, I am facing an issue in one of the use cases that I am trying to implement. I am getting a purchase order from one of the trading partners through Oracle B2B. B2B forwards this B2BM (B2B message ) to AIAB2BInterface. From AIAB2BInterface my BPEL process gets invoked, which in turn... (1 Reply)
Discussion started by: mayank2211
1 Replies

5. Shell Programming and Scripting

curl script to download files from Secured HTTPS server?

curl -# -v -d "sendusername=myname&password=mypassword&wheretogo=download.php" -L -o test.zip http://www.ims-dm.com/cgi/securedownload.php?p=HIREFTPM\&prodtype=hire/test.zip * About to connect() to www.ims-dm.com port 80 * Trying 209.61.193.139... connected * Connected to www.ims-dm.com... (1 Reply)
Discussion started by: laknar
1 Replies

6. Shell Programming and Scripting

Curl ftp upload success but no file exist on the server !!!!

hello, I'm trying to upload a file to this ftp server and others ftp://ftp.byethost12.com as you can see in the output of CURL using the -v option curl reports that the upload succeeded but when i connected to the server with file-zilla there is no file uploaded the same command upload files... (5 Replies)
Discussion started by: laraaj
5 Replies

7. Shell Programming and Scripting

proxy server with wget or cli curl

I'm using a proxy service with an ip address and a port number. How do I use the proxy with wget or cli curl? (1 Reply)
Discussion started by: locoroco
1 Replies

8. Shell Programming and Scripting

Use cURL in shell script and get most recent file from remote server using SFTP

I have been trying to implement the following shell script -- sftp to remote server get list of files in the directory sftp get the most recent listed file exit This script will be scheduled to be executed everyday using CRON or CONTROL-M and the need is to have absolutely no human... (7 Replies)
Discussion started by: toobrown1
7 Replies

9. Shell Programming and Scripting

Empty reply from server

Hi, I call a .php page using curl (cron setting) It does complete the data processing only 50% and returns an error Empty reply from server. I can't figure it out why do I get that error. # cat /var/log/curl_cron.log % Total % Received % Xferd Average Speed Time Time Time ... (1 Reply)
Discussion started by: shantanuo
1 Replies
Login or Register to Ask a Question