D
D
demoded2012-08-08 11:45:50
Nginx
demoded, 2012-08-08 11:45:50

Nginx 504 Gateway Timeout when running with CURL?

put the server on NginX for the first time, everything works, except for CURL. this code fails on timeout

if( !function_exists( 'curl_init' ) )
  {
 		die( "Curl PHP package not installed!" );
 	}

  /** Initializing CURL **/
  $ch = curl_init();
 	curl_setopt( $ch, CURLOPT_URL, XMLRPC_URL );
 	curl_setopt( $ch, CURLOPT_HEADER, false );
 	curl_setopt( $ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml") );
 	curl_setopt( $ch, CURLOPT_POSTFIELDS, $data );

 	/** Now execute the CURL, download the URL specified **/
 	$response = curl_exec( $ch );

tell me in which direction to dig? I installed nginx for the first time, I'm not very good at it yet.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2012-08-08
@demoded

1. shoaibmir.wordpress.com/2009/03/10/using-curl-for-xmlrpc-calls/
2. phpxmlrpc.sourceforge.net

S
Sergey, 2012-08-08
@Ualde

Guessing is a tricky thing.
But I can assume that the point is in the link that you are trying to open / download. The script for 30 seconds is hammered in this direction and then falls off.
Also, if you can see the php-fpm logs, what they give out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question