REST Resource Javascript curl error


(Nic Hubbard) #1

Matrix Version: 5.3.1.0

We are using the REST Resource Javascript and the REST Resource asset, and both are giving us the following error:

Curl Error: ‘https://theurlweareusing’: Operation timed out after 10069 milliseconds with 892826 out of -1 bytes received [REST0001]

Obviously we had a valid URL.

Is this Curl Error something that is coming from PHP? I can make the same request in a REST client and I get a successfully response. But, in Matrix we get this error, and about half the JSON, then it gets cut off.


(Bart Banda) #2

Not sure, is the page request data huge?

How big is the resource you are trying to REST in?

I was going to suggest checking that the matrix server has access to the endpoint but if you are getting half of the data back then it seems like a memory restriction thing.

Could you try increasing the Web Memory Limit in the System Config?


(Marcus Fong) #3

How long does the response take to come back when you try it in a REST client, Nick? That error looks like it hit the cURL timeout - when you create a new REST Resource JS page, the timeout period defaults to 10s.

In your REST Resource JavaScript page’s Details screen, look for “Timeout (seconds)” under the HTTP Request options and try increasing it from 10 to, say, 30. Then try it again.


(Nic Hubbard) #4

The request data that is returned is 4.3 MB. It takes about 4 seconds to come back. Never close to 10 seconds, so that is why this is strange.


(Marcus Fong) #5

Are you doing your REST client test from the server itself, or from some other system?

Also, if you increase the timeout in the REST Resource JavaScript page, does the request complete, or does it still time out?


(Nic Hubbard) #6

I was using a REST client on my local computer.

When bumping the timeout to 30 seconds it worked. Looks like I am an idiot. :slight_smile: