question

HarshChaudhary-0929 avatar image
0 Votes"
HarshChaudhary-0929 asked ryanchill edited

Flask app when deployed to azure web service giving incomplete response content

I am using flask to make a proxy. I am hitting an api endoint from flask POST endpoint, sending back response. This process is working properly without any issue on my local machine. When I deployed the same to azure web service, sometimes it is sending me incomplete content in response.

Can you please suggest me anything ?

azure-webappsazure-webapps-development
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Can you clarify the following @HarshChaudhary-0929:

  • How is your API service deployed and configured?

  • How is the content incomplete?




0 Votes 0 ·

@ryanchill
While running flask post endpoint locally (on localhost):
Request

 POST http://127.0.0.1:5000/ HTTP/1.1
 Content-Type: text/xml
    
 <IDORequest ProtocolVersion="5.02" SessionID="">
   <RequestHeader Type="OpenSession"/>
 </IDORequest>

Response

 <IDOResponse ProtocolVersion="6.01" SessionID="84279383847967388798392898">
   <ResponseHeader Type="OpenSession">
     <InitiatorType/>
     <InitiatorName/>
     <SourceName/>
     <SourceConfig/>
     <TargetName/>
     <TargetConfig/>
     <ResponseData>
     </ResponseData>
   </ResponseHeader>
 </IDOResponse>



0 Votes 0 ·

@ryanchill
While running deployed version of flask endpoint (https://<myappservicename>.azurewebsites.net/):
Request

 POST https://<myappservicename>.azurewebsites.net/ HTTP/1.1
 Content-Type: text/xml
    
 <IDORequest ProtocolVersion="5.02" SessionID="">
   <RequestHeader Type="OpenSession"/>
 </IDORequest>

Response

 <IDOResponse ProtocolVersion="6.01" SessionID="3872944628799">
   <ResponseHeader Type="OpenSession">
     <InitiatorType/>
     <InitiatorName/>
     <SourceName/>
     <SourceConfig/>
     <TargetName/>
     <TargetConfig/>
     <Resp

The response coming above is incomplete. I also saw that sometimes it works fine, but most of the time i get this incomplete response.

0 Votes 0 ·

How my app service is deployed
I created my app service manually on azure portal with basic tier. The configuration is attached as screenshot below:
105000-image.png



I have deployed code through vscode.

0 Votes 0 ·
image.png (54.3 KiB)
ryanchill avatar image ryanchill HarshChaudhary-0929 ·

Thanks for information @HarshChaudhary-0929. It was really helpful, but I can't think of any reason the response would be truncated like that. Please respond to the private message below so I can work more closely with you regarding this matter.

0 Votes 0 ·

0 Answers