Re: [google-appengine] Question about dispatch & backends

2021-01-11 Thread Joshua Smith
FYI, I've solved this puzzle.

The problem wasn't that the B8 instance was timing out in less than 60 seconds.

The problem was that I had the B8 set to max-instance = 1, so if two concurrent 
API requests came in, the dispatcher had nowhere to send the second request. It 
would hang around awhile, waiting for the B8 to free up, and eventually time 
out.

So the only "bug" here is that the error message from the dispatcher could be 
improved, by mentioning that the *reason* it timed out isn't that the server 
took too long, but rather that max-instances is too low.

-Joshua

> On Dec 14, 2020, at 11:26 AM, Linus Larsen  wrote:
> 
> I think I have seen some documentation way back that it was not possible to 
> serve user facing requests from a B instance, instead you
> were supposed to dispatch the request to a TaskQueue and use some sort of 
> client polling in order to get notified when the work on B
> instance was completed. 
> 
> Cannot find it anymore, the documentation has changed so much you don't 
> really know what's the truth anymore.
> 
> / Linus  
> 
> On Mon, Dec 14, 2020 at 3:13 PM Joshua Smith  > wrote:
> I'm thinking you didn't read my initial message carefully, so let me try 
> again.
> 
> Yes, I'm using the legacy runtime with the 1 minute limit on frontends.
> 
> Yes, I'm using the B8 with basic scaling for my API calls, which should not 
> have that limit.
> 
> Yes, I'm using URL routing via dispatch.yaml, and have confirmed the B8 
> instance is handling the request by checking the logs.
> 
> The request is nonetheless failing because it's taking more than one minute. 
> 
> That should not be happening, according to the documentation. Unless there's 
> another 1 minute limit somewhere else that I'm not aware of.
> 
> -Joshua
> 
>> On Dec 13, 2020, at 8:58 PM, 'Manpreet Sidhu (Google Cloud Support)' via 
>> Google App Engine > > wrote:
>> 
>> Even though your frontend uses automatic scaling, the work is being done on 
>> the B8 instance that is responsible for running your API service.
>> 
>> Based on the screenshot that you attached, the B8 instance has to return in 
>> 24 hours. This is due to the fact that the B8 instance is only capable of 
>> Manual and Basic scaling[0].
>> 
>> Can it be safe to assume that you are using a Legacy Runtime as that is 
>> where the limit of 1 minute is enforced. As an alternative, you can try 
>> routing with URLs[1] or look into implementing the use of Task Queues as 
>> that has a timeout of 10 minutes.
>> 
>> [0]: https://cloud.google.com/appengine/docs/standard#instance_classes 
>> 
>> [1]: 
>> https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed#urls
>>  
>> 
>> On Saturday, December 12, 2020 at 10:11:28 AM UTC-5 Joshua Smith wrote:
>> https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed#timeout
>>  
>> 
>> 
>> My frontend service uses automatic scaling, so it has a 1 minute limit to 
>> respond. But my API service is a B8 with this:
>> 
>> 
>> 
>> which means that it should not be subjected to that limit. Yet when I send 
>> requests to it via the dispatch, it seems to be enforcing at 1 minute limit 
>> regardless.
>> 
>> 
>> 
>> 
>>> On Dec 11, 2020, at 4:44 PM, 'Elliott (Cloud Platform Support)' via Google 
>>> App Engine > wrote:
>>> 
>> 
>>> Hello Joshua,
>>> 
>>> I understand that your program uses APIs that need more than 60 seconds to 
>>> complete but even though you are using B8 instances in App Engine, your 
>>> program times out past the 60 seconds. I’m assuming you are using App 
>>> Engine Standard.
>>> 
>>> To find supporting documentation for you, can you tell me more about the 
>>> "gotta get it done in 60 seconds" rule? Can you please give examples of 
>>> this?
>>> 
>>> 
>>> On Friday, December 11, 2020 at 12:01:48 PM UTC-5 Joshua Smith wrote:
>>> I have an app with a frontend UX that queries some backend APIs for 
>>> information. Some of these APIs need more than 60 seconds to complete their 
>>> work.
>>> 
>>> I *thought* I could solve this by doing the following:
>>> 
>>> 1. Run the code on a B8 instance with a different service name
>>> 2. Set up dispatch.yaml to direct the incoming API requests to that service:
>>> 
>>> dispatch:
>>> 
>>> - url: "*/api/*"
>>>   service: reporting
>>> 
>>> - url: "*/*"
>>>   service: default
>>> 
>>> The dispatching is working correctly. I see this in my logs for an /api hit:
>>> 
>>> 
>>> However, it's timing out:
>>> 
>>> 
>>> 
>>> My understanding was that a B8 instance didn't have the "gotta get it done 
>>> in 60 seconds" rule that frontend instance types did.
>>> 
>>> What am I missing?
>>> 
>>> -Joshua
>>> 
>>> 
>> 

Re: [google-appengine] Question about dispatch & backends

2020-12-15 Thread Joshua Smith
I've created the issue in the tracker.

> On Dec 14, 2020, at 3:35 PM, 'Elliott (Cloud Platform Support)' via Google 
> App Engine  wrote:
> 
> Hello Joshua,
> 
> I’m sorry the conversation in this thread is going on and you do not have the 
> answer you need.  You indicated that the request is failing because it's 
> taking more than one minute and that is not how the behavior is supposed to 
> be according to documentation.
> 
> Because Google Groups is meant for general discussions, the next step is to 
> either report a common issue here 
> , 
> since I could not find one at this time or go through regular support 
> channels here  to get 1 on 1 support.
> 
> I know this is frustrating after all the exchanges but one these options 
> would be the best way to move forward.
> 
> 
> On Monday, December 14, 2020 at 11:49:57 AM UTC-5 Joshua Smith wrote:
> When I hit the B8 with a request to its appspot.com  
> address, those happily run for more than a minute. The issue seems to be 
> related to dispatching. (I can't just have my front-end connect to the 
> appspot address, because I need some cookies to be present, so cross-domain 
> is out.)
> 
> -Joshua
> 
> 
>> On Dec 14, 2020, at 11:26 AM, Linus Larsen > > wrote:
>> 
> 
>> I think I have seen some documentation way back that it was not possible to 
>> serve user facing requests from a B instance, instead you
>> were supposed to dispatch the request to a TaskQueue and use some sort of 
>> client polling in order to get notified when the work on B
>> instance was completed. 
>> 
>> Cannot find it anymore, the documentation has changed so much you don't 
>> really know what's the truth anymore.
>> 
>> / Linus  
>> 
>> On Mon, Dec 14, 2020 at 3:13 PM Joshua Smith > > wrote:
>> I'm thinking you didn't read my initial message carefully, so let me try 
>> again.
>> 
>> Yes, I'm using the legacy runtime with the 1 minute limit on frontends.
>> 
>> Yes, I'm using the B8 with basic scaling for my API calls, which should not 
>> have that limit.
>> 
>> Yes, I'm using URL routing via dispatch.yaml, and have confirmed the B8 
>> instance is handling the request by checking the logs.
>> 
>> The request is nonetheless failing because it's taking more than one minute. 
>> 
>> That should not be happening, according to the documentation. Unless there's 
>> another 1 minute limit somewhere else that I'm not aware of.
>> 
>> -Joshua
>> 
>>> On Dec 13, 2020, at 8:58 PM, 'Manpreet Sidhu (Google Cloud Support)' via 
>>> Google App Engine >> > wrote:
>>> 
>>> Even though your frontend uses automatic scaling, the work is being done on 
>>> the B8 instance that is responsible for running your API service.
>>> 
>>> Based on the screenshot that you attached, the B8 instance has to return in 
>>> 24 hours. This is due to the fact that the B8 instance is only capable of 
>>> Manual and Basic scaling[0].
>>> 
>>> Can it be safe to assume that you are using a Legacy Runtime as that is 
>>> where the limit of 1 minute is enforced. As an alternative, you can try 
>>> routing with URLs[1] or look into implementing the use of Task Queues as 
>>> that has a timeout of 10 minutes.
>>> 
>>> [0]: https://cloud.google.com/appengine/docs/standard#instance_classes 
>>> 
>>> [1]: 
>>> https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed#urls
>>>  
>>> 
>>> On Saturday, December 12, 2020 at 10:11:28 AM UTC-5 Joshua Smith wrote:
>>> https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed#timeout
>>>  
>>> 
>>> 
>>> My frontend service uses automatic scaling, so it has a 1 minute limit to 
>>> respond. But my API service is a B8 with this:
>>> 
>>> 
>>> 
>>> which means that it should not be subjected to that limit. Yet when I send 
>>> requests to it via the dispatch, it seems to be enforcing at 1 minute limit 
>>> regardless.
>>> 
>>> 
>>> 
>>> 
 On Dec 11, 2020, at 4:44 PM, 'Elliott (Cloud Platform Support)' via Google 
 App Engine > wrote:
 
>>> 
 Hello Joshua,
 
 I understand that your program uses APIs that need more than 60 seconds to 
 complete but even though you are using B8 instances in App Engine, your 
 program times out past the 60 seconds. I’m assuming you are using App 
 Engine Standard.
 
 To find supporting documentation for you, can you tell me more about the 
 "gotta get it done in 60 seconds" rule? Can you please give examples of 
 this?
 
 
 On Friday, December 11, 2020 at 12:01:48 PM UTC-5 Joshua Smith wrote:
 I have an app with a frontend UX that queries some backend APIs for 
 information. Some 

Re: [google-appengine] Question about dispatch & backends

2020-12-14 Thread 'Elliott (Cloud Platform Support)' via Google App Engine
Hello Joshua,

I’m sorry the conversation in this thread is going on and you do not have 
the answer you need.  You indicated that the request is failing because 
it's taking more than one minute and that is not how the behavior is 
supposed to be according to documentation.

Because Google Groups is meant for general discussions, the next step is to 
either report a common issue here 
, 
since I could not find one at this time or go through regular support 
channels here  to get 1 on 1 support.

I know this is frustrating after all the exchanges but one these options 
would be the best way to move forward.


On Monday, December 14, 2020 at 11:49:57 AM UTC-5 Joshua Smith wrote:

> When I hit the B8 with a request to its appspot.com address, those 
> happily run for more than a minute. The issue seems to be related to 
> dispatching. (I can't just have my front-end connect to the appspot 
> address, because I need some cookies to be present, so cross-domain is out.)
>
> -Joshua
>
> On Dec 14, 2020, at 11:26 AM, Linus Larsen  wrote:
>
> I think I have seen some documentation way back that it was not possible 
> to serve user facing requests from a B instance, instead you
> were supposed to dispatch the request to a TaskQueue and use some sort of 
> client polling in order to get notified when the work on B
> instance was completed. 
>
> Cannot find it anymore, the documentation has changed so much you don't 
> really know what's the truth anymore.
>
> / Linus  
>
> On Mon, Dec 14, 2020 at 3:13 PM Joshua Smith  wrote:
>
>> I'm thinking you didn't read my initial message carefully, so let me try 
>> again.
>>
>> Yes, I'm using the legacy runtime with the 1 minute limit on frontends.
>>
>> Yes, I'm using the B8 with basic scaling for my API calls, which should 
>> not have that limit.
>>
>> Yes, I'm using URL routing via dispatch.yaml, and have confirmed the B8 
>> instance is handling the request by checking the logs.
>>
>> *The request is nonetheless failing because it's taking more than one 
>> minute. *
>>
>> That should not be happening, according to the documentation. Unless 
>> there's *another* 1 minute limit somewhere else that I'm not aware of.
>>
>> -Joshua
>>
>> On Dec 13, 2020, at 8:58 PM, 'Manpreet Sidhu (Google Cloud Support)' via 
>> Google App Engine  wrote:
>>
>> Even though your frontend uses automatic scaling, the work is being done 
>> on the B8 instance that is responsible for running your API service.
>>
>> Based on the screenshot that you attached, the B8 instance has to return 
>> in 24 hours. This is due to the fact that the B8 instance is only capable 
>> of Manual and Basic scaling[0].
>>
>> Can it be safe to assume that you are using a Legacy Runtime as that is 
>> where the limit of 1 minute is enforced. As an alternative, you can try 
>> routing with URLs[1] or look into implementing the use of Task Queues as 
>> that has a timeout of 10 minutes.
>>
>> [0]: https://cloud.google.com/appengine/docs/standard#instance_classes
>> [1]: 
>> https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed#urls
>> On Saturday, December 12, 2020 at 10:11:28 AM UTC-5 Joshua Smith wrote:
>>
>>>
>>> https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed#timeout
>>>
>>> My frontend service uses automatic scaling, so it has a 1 minute limit 
>>> to respond. But my API service is a B8 with this:
>>>
>>>
>>> which means that it should not be subjected to that limit. Yet when I 
>>> send requests to it via the dispatch, it seems to be enforcing at 1 minute 
>>> limit regardless.
>>>
>>>
>>>
>>> On Dec 11, 2020, at 4:44 PM, 'Elliott (Cloud Platform Support)' via 
>>> Google App Engine  wrote:
>>>
>>> Hello Joshua,
>>>
>>> I understand that your program uses APIs that need more than 60 seconds 
>>> to complete but even though you are using B8 instances in App Engine, your 
>>> program times out past the 60 seconds. I’m assuming you are using App 
>>> Engine Standard.
>>>
>>> To find supporting documentation for you, can you tell me more about the 
>>> "gotta get it done in 60 seconds" rule? Can you please give examples of 
>>> this?
>>>
>>>
>>> On Friday, December 11, 2020 at 12:01:48 PM UTC-5 Joshua Smith wrote:
>>>
 I have an app with a frontend UX that queries some backend APIs for 
 information. Some of these APIs need more than 60 seconds to complete 
 their 
 work.

 I *thought* I could solve this by doing the following:

 1. Run the code on a B8 instance with a different service name
 2. Set up dispatch.yaml to direct the incoming API requests to that 
 service:

 dispatch:

 - url: "*/api/*"
   service: reporting

 - url: "*/*"
   service: default

 The dispatching is working correctly. I see this in my logs for an /api 
 hit:

 However, it's timing out:



Re: [google-appengine] Question about dispatch & backends

2020-12-14 Thread Joshua Smith
When I hit the B8 with a request to its appspot.com  
address, those happily run for more than a minute. The issue seems to be 
related to dispatching. (I can't just have my front-end connect to the appspot 
address, because I need some cookies to be present, so cross-domain is out.)

-Joshua

> On Dec 14, 2020, at 11:26 AM, Linus Larsen  wrote:
> 
> I think I have seen some documentation way back that it was not possible to 
> serve user facing requests from a B instance, instead you
> were supposed to dispatch the request to a TaskQueue and use some sort of 
> client polling in order to get notified when the work on B
> instance was completed. 
> 
> Cannot find it anymore, the documentation has changed so much you don't 
> really know what's the truth anymore.
> 
> / Linus  
> 
> On Mon, Dec 14, 2020 at 3:13 PM Joshua Smith  > wrote:
> I'm thinking you didn't read my initial message carefully, so let me try 
> again.
> 
> Yes, I'm using the legacy runtime with the 1 minute limit on frontends.
> 
> Yes, I'm using the B8 with basic scaling for my API calls, which should not 
> have that limit.
> 
> Yes, I'm using URL routing via dispatch.yaml, and have confirmed the B8 
> instance is handling the request by checking the logs.
> 
> The request is nonetheless failing because it's taking more than one minute. 
> 
> That should not be happening, according to the documentation. Unless there's 
> another 1 minute limit somewhere else that I'm not aware of.
> 
> -Joshua
> 
>> On Dec 13, 2020, at 8:58 PM, 'Manpreet Sidhu (Google Cloud Support)' via 
>> Google App Engine > > wrote:
>> 
>> Even though your frontend uses automatic scaling, the work is being done on 
>> the B8 instance that is responsible for running your API service.
>> 
>> Based on the screenshot that you attached, the B8 instance has to return in 
>> 24 hours. This is due to the fact that the B8 instance is only capable of 
>> Manual and Basic scaling[0].
>> 
>> Can it be safe to assume that you are using a Legacy Runtime as that is 
>> where the limit of 1 minute is enforced. As an alternative, you can try 
>> routing with URLs[1] or look into implementing the use of Task Queues as 
>> that has a timeout of 10 minutes.
>> 
>> [0]: https://cloud.google.com/appengine/docs/standard#instance_classes 
>> 
>> [1]: 
>> https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed#urls
>>  
>> 
>> On Saturday, December 12, 2020 at 10:11:28 AM UTC-5 Joshua Smith wrote:
>> https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed#timeout
>>  
>> 
>> 
>> My frontend service uses automatic scaling, so it has a 1 minute limit to 
>> respond. But my API service is a B8 with this:
>> 
>> 
>> 
>> which means that it should not be subjected to that limit. Yet when I send 
>> requests to it via the dispatch, it seems to be enforcing at 1 minute limit 
>> regardless.
>> 
>> 
>> 
>> 
>>> On Dec 11, 2020, at 4:44 PM, 'Elliott (Cloud Platform Support)' via Google 
>>> App Engine > wrote:
>>> 
>> 
>>> Hello Joshua,
>>> 
>>> I understand that your program uses APIs that need more than 60 seconds to 
>>> complete but even though you are using B8 instances in App Engine, your 
>>> program times out past the 60 seconds. I’m assuming you are using App 
>>> Engine Standard.
>>> 
>>> To find supporting documentation for you, can you tell me more about the 
>>> "gotta get it done in 60 seconds" rule? Can you please give examples of 
>>> this?
>>> 
>>> 
>>> On Friday, December 11, 2020 at 12:01:48 PM UTC-5 Joshua Smith wrote:
>>> I have an app with a frontend UX that queries some backend APIs for 
>>> information. Some of these APIs need more than 60 seconds to complete their 
>>> work.
>>> 
>>> I *thought* I could solve this by doing the following:
>>> 
>>> 1. Run the code on a B8 instance with a different service name
>>> 2. Set up dispatch.yaml to direct the incoming API requests to that service:
>>> 
>>> dispatch:
>>> 
>>> - url: "*/api/*"
>>>   service: reporting
>>> 
>>> - url: "*/*"
>>>   service: default
>>> 
>>> The dispatching is working correctly. I see this in my logs for an /api hit:
>>> 
>>> 
>>> However, it's timing out:
>>> 
>>> 
>>> 
>>> My understanding was that a B8 instance didn't have the "gotta get it done 
>>> in 60 seconds" rule that frontend instance types did.
>>> 
>>> What am I missing?
>>> 
>>> -Joshua
>>> 
>>> 
>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Google App Engine" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to google-appengi...@googlegroups.com <>.
>>> To view 

Re: [google-appengine] Question about dispatch & backends

2020-12-14 Thread Linus Larsen
I think I have seen some documentation way back that it was not possible to
serve user facing requests from a B instance, instead you
were supposed to dispatch the request to a TaskQueue and use some sort of
client polling in order to get notified when the work on B
instance was completed.

Cannot find it anymore, the documentation has changed so much you don't
really know what's the truth anymore.

/ Linus

On Mon, Dec 14, 2020 at 3:13 PM Joshua Smith 
wrote:

> I'm thinking you didn't read my initial message carefully, so let me try
> again.
>
> Yes, I'm using the legacy runtime with the 1 minute limit on frontends.
>
> Yes, I'm using the B8 with basic scaling for my API calls, which should
> not have that limit.
>
> Yes, I'm using URL routing via dispatch.yaml, and have confirmed the B8
> instance is handling the request by checking the logs.
>
> *The request is nonetheless failing because it's taking more than one
> minute. *
>
> That should not be happening, according to the documentation. Unless
> there's *another* 1 minute limit somewhere else that I'm not aware of.
>
> -Joshua
>
> On Dec 13, 2020, at 8:58 PM, 'Manpreet Sidhu (Google Cloud Support)' via
> Google App Engine  wrote:
>
> Even though your frontend uses automatic scaling, the work is being done
> on the B8 instance that is responsible for running your API service.
>
> Based on the screenshot that you attached, the B8 instance has to return
> in 24 hours. This is due to the fact that the B8 instance is only capable
> of Manual and Basic scaling[0].
>
> Can it be safe to assume that you are using a Legacy Runtime as that is
> where the limit of 1 minute is enforced. As an alternative, you can try
> routing with URLs[1] or look into implementing the use of Task Queues as
> that has a timeout of 10 minutes.
>
> [0]: https://cloud.google.com/appengine/docs/standard#instance_classes
> [1]:
> https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed#urls
> On Saturday, December 12, 2020 at 10:11:28 AM UTC-5 Joshua Smith wrote:
>
>>
>> https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed#timeout
>>
>> My frontend service uses automatic scaling, so it has a 1 minute limit to
>> respond. But my API service is a B8 with this:
>>
>>
>> which means that it should not be subjected to that limit. Yet when I
>> send requests to it via the dispatch, it seems to be enforcing at 1 minute
>> limit regardless.
>>
>>
>>
>> On Dec 11, 2020, at 4:44 PM, 'Elliott (Cloud Platform Support)' via
>> Google App Engine  wrote:
>>
>> Hello Joshua,
>>
>> I understand that your program uses APIs that need more than 60 seconds
>> to complete but even though you are using B8 instances in App Engine, your
>> program times out past the 60 seconds. I’m assuming you are using App
>> Engine Standard.
>>
>> To find supporting documentation for you, can you tell me more about the
>> "gotta get it done in 60 seconds" rule? Can you please give examples of
>> this?
>>
>>
>> On Friday, December 11, 2020 at 12:01:48 PM UTC-5 Joshua Smith wrote:
>>
>>> I have an app with a frontend UX that queries some backend APIs for
>>> information. Some of these APIs need more than 60 seconds to complete their
>>> work.
>>>
>>> I *thought* I could solve this by doing the following:
>>>
>>> 1. Run the code on a B8 instance with a different service name
>>> 2. Set up dispatch.yaml to direct the incoming API requests to that
>>> service:
>>>
>>> dispatch:
>>>
>>> - url: "*/api/*"
>>>   service: reporting
>>>
>>> - url: "*/*"
>>>   service: default
>>>
>>> The dispatching is working correctly. I see this in my logs for an /api
>>> hit:
>>>
>>> However, it's timing out:
>>>
>>>
>>> My understanding was that a B8 instance didn't have the "gotta get it
>>> done in 60 seconds" rule that frontend instance types did.
>>>
>>> What am I missing?
>>>
>>> -Joshua
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to google-appengi...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/google-appengine/7209920b-7b59-4dd4-84a6-e722e7df462bn%40googlegroups.com
>> 
>> .
>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/6d4408fa-0030-42c4-990b-14223e773c27n%40googlegroups.com
> 
> .
>
>
> --
> You 

Re: [google-appengine] Question about dispatch & backends

2020-12-14 Thread Joshua Smith
I'm thinking you didn't read my initial message carefully, so let me try again.

Yes, I'm using the legacy runtime with the 1 minute limit on frontends.

Yes, I'm using the B8 with basic scaling for my API calls, which should not 
have that limit.

Yes, I'm using URL routing via dispatch.yaml, and have confirmed the B8 
instance is handling the request by checking the logs.

The request is nonetheless failing because it's taking more than one minute. 

That should not be happening, according to the documentation. Unless there's 
another 1 minute limit somewhere else that I'm not aware of.

-Joshua

> On Dec 13, 2020, at 8:58 PM, 'Manpreet Sidhu (Google Cloud Support)' via 
> Google App Engine  wrote:
> 
> Even though your frontend uses automatic scaling, the work is being done on 
> the B8 instance that is responsible for running your API service.
> 
> Based on the screenshot that you attached, the B8 instance has to return in 
> 24 hours. This is due to the fact that the B8 instance is only capable of 
> Manual and Basic scaling[0].
> 
> Can it be safe to assume that you are using a Legacy Runtime as that is where 
> the limit of 1 minute is enforced. As an alternative, you can try routing 
> with URLs[1] or look into implementing the use of Task Queues as that has a 
> timeout of 10 minutes.
> 
> [0]: https://cloud.google.com/appengine/docs/standard#instance_classes 
> 
> [1]: 
> https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed#urls
>  
> 
> On Saturday, December 12, 2020 at 10:11:28 AM UTC-5 Joshua Smith wrote:
> https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed#timeout
>  
> 
> 
> My frontend service uses automatic scaling, so it has a 1 minute limit to 
> respond. But my API service is a B8 with this:
> 
> 
> 
> which means that it should not be subjected to that limit. Yet when I send 
> requests to it via the dispatch, it seems to be enforcing at 1 minute limit 
> regardless.
> 
> 
> 
> 
>> On Dec 11, 2020, at 4:44 PM, 'Elliott (Cloud Platform Support)' via Google 
>> App Engine > > wrote:
>> 
> 
>> Hello Joshua,
>> 
>> I understand that your program uses APIs that need more than 60 seconds to 
>> complete but even though you are using B8 instances in App Engine, your 
>> program times out past the 60 seconds. I’m assuming you are using App Engine 
>> Standard.
>> 
>> To find supporting documentation for you, can you tell me more about the 
>> "gotta get it done in 60 seconds" rule? Can you please give examples of this?
>> 
>> 
>> On Friday, December 11, 2020 at 12:01:48 PM UTC-5 Joshua Smith wrote:
>> I have an app with a frontend UX that queries some backend APIs for 
>> information. Some of these APIs need more than 60 seconds to complete their 
>> work.
>> 
>> I *thought* I could solve this by doing the following:
>> 
>> 1. Run the code on a B8 instance with a different service name
>> 2. Set up dispatch.yaml to direct the incoming API requests to that service:
>> 
>> dispatch:
>> 
>> - url: "*/api/*"
>>   service: reporting
>> 
>> - url: "*/*"
>>   service: default
>> 
>> The dispatching is working correctly. I see this in my logs for an /api hit:
>> 
>> 
>> However, it's timing out:
>> 
>> 
>> 
>> My understanding was that a B8 instance didn't have the "gotta get it done 
>> in 60 seconds" rule that frontend instance types did.
>> 
>> What am I missing?
>> 
>> -Joshua
>> 
>> 
> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Google App Engine" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-appengi...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-appengine/7209920b-7b59-4dd4-84a6-e722e7df462bn%40googlegroups.com
>>  
>> .
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to google-appengine+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/google-appengine/6d4408fa-0030-42c4-990b-14223e773c27n%40googlegroups.com
>  
> .

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, 

Re: [google-appengine] Question about dispatch & backends

2020-12-13 Thread 'Manpreet Sidhu (Google Cloud Support)' via Google App Engine
Even though your frontend uses automatic scaling, the work is being done on 
the B8 instance that is responsible for running your API service.

Based on the screenshot that you attached, the B8 instance has to return in 
24 hours. This is due to the fact that the B8 instance is only capable of 
Manual and Basic scaling[0].

Can it be safe to assume that you are using a Legacy Runtime as that is 
where the limit of 1 minute is enforced. As an alternative, you can try 
routing with URLs[1] or look into implementing the use of Task Queues as 
that has a timeout of 10 minutes.

[0]: https://cloud.google.com/appengine/docs/standard#instance_classes
[1]: 
https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed#urls
On Saturday, December 12, 2020 at 10:11:28 AM UTC-5 Joshua Smith wrote:

>
> https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed#timeout
>
> My frontend service uses automatic scaling, so it has a 1 minute limit to 
> respond. But my API service is a B8 with this:
>
>
> which means that it should not be subjected to that limit. Yet when I send 
> requests to it via the dispatch, it seems to be enforcing at 1 minute limit 
> regardless.
>
>
>
> On Dec 11, 2020, at 4:44 PM, 'Elliott (Cloud Platform Support)' via Google 
> App Engine  wrote:
>
> Hello Joshua,
>
> I understand that your program uses APIs that need more than 60 seconds to 
> complete but even though you are using B8 instances in App Engine, your 
> program times out past the 60 seconds. I’m assuming you are using App 
> Engine Standard.
>
> To find supporting documentation for you, can you tell me more about the 
> "gotta get it done in 60 seconds" rule? Can you please give examples of 
> this?
>
>
> On Friday, December 11, 2020 at 12:01:48 PM UTC-5 Joshua Smith wrote:
>
>> I have an app with a frontend UX that queries some backend APIs for 
>> information. Some of these APIs need more than 60 seconds to complete their 
>> work.
>>
>> I *thought* I could solve this by doing the following:
>>
>> 1. Run the code on a B8 instance with a different service name
>> 2. Set up dispatch.yaml to direct the incoming API requests to that 
>> service:
>>
>> dispatch:
>>
>> - url: "*/api/*"
>>   service: reporting
>>
>> - url: "*/*"
>>   service: default
>>
>> The dispatching is working correctly. I see this in my logs for an /api 
>> hit:
>>
>> However, it's timing out:
>>
>>
>> My understanding was that a B8 instance didn't have the "gotta get it 
>> done in 60 seconds" rule that frontend instance types did.
>>
>> What am I missing?
>>
>> -Joshua
>>
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to google-appengi...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/google-appengine/7209920b-7b59-4dd4-84a6-e722e7df462bn%40googlegroups.com
>  
> 
> .
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/6d4408fa-0030-42c4-990b-14223e773c27n%40googlegroups.com.


[google-appengine] Question about dispatch & backends

2020-12-11 Thread Joshua Smith
I have an app with a frontend UX that queries some backend APIs for 
information. Some of these APIs need more than 60 seconds to complete their 
work.

I *thought* I could solve this by doing the following:

1. Run the code on a B8 instance with a different service name
2. Set up dispatch.yaml to direct the incoming API requests to that service:

dispatch:

- url: "*/api/*"
  service: reporting

- url: "*/*"
  service: default

The dispatching is working correctly. I see this in my logs for an /api hit:


However, it's timing out:



My understanding was that a B8 instance didn't have the "gotta get it done in 
60 seconds" rule that frontend instance types did.

What am I missing?

-Joshua

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/4F4943B1-BE85-434C-A819-33BB353CFD8C%40gmail.com.