Service Callout policy getting timed out and unable to forward response to client

Not applicable

Hi ,

I have created a proxy with target endpoint . It Calls another proxy using servicecallout policy (Inline response message) in ProxyEndpoint under postflow in response, response from this service. Using this policy I am calling my other proxy. it stores my cache data into Apigee BaaS using cache_key and proxy-response.

Sometimes I am able to call my backend proxy using this, sometimes I am getting timed out error and also I unable to see the response in my final output. I am getting blank data.

I used javascript policy to forward my response to web but still I am getting blank response

I tried following ways to forward my response

context.proxyResponse.content = context.getVariable('response');

context.proxyResponse.content = context.getVariable('response.content');


Kindly advise me on how to call my backend proxy to store cache data in BaaS

If not their is any other way to store my cache data in BaaS

At the same time if I got any error response from target server I need to pull cached data from it and passed to the client.

0 2 381
2 REPLIES 2

I'm having trouble understanding. I think

  • you are using the Response / PostFlow in the ProxyEndpoint
  • in that flow, you have a ServiceCallout policy
  • sometimes the ServiceCallout policy times out , and sometimes it does not.

Is that right?

I don't understand where the caching is happening.

If your ServiceCallout is timing out, have you looked at the server system? Under what circumstances does the service timeout ? Have you tested it independently of the ServiceCallout policy? In other words have you tested that backend system just by invoking it from outside of an Apigee Edge proxy? What results do you see?

What does the backend service connect to? Is that data store returning results in a timely manner, always?

In general, I would suggest that you try to break down the problem to its most simple parts, and analyze each one separately. If a service is timing out, focus on that specific service, and investigate why.

Not applicable

@rsekhar, Ideally response.content will have the playload which needs to be forwarded, you do not need to assign it to

context.proxyResponse.content