Re: [google-appengine] Question about Using Concurrent Requests (Python 2.7)
Hi PK, OK. There are two instanses in dashboard. Version:5 ah-builtin-python-bundle Total number of instancesAverage QPS*Average Latency*Average Memory2 total 0.000Unknown ms24.6 MBytes*Instances *[image: help]https://developers.google.com/appengine/docs/adminconsole/instances QPS*Latency*RequestsErrorsAgeMemoryLogsAvailabilityShutdown0..0 ms690 1:06:3824.2 MBytesView Logshttps://appengine.google.com/logs?app_id=s~apprtcversion_id=5.363921767398385243severity_level_override=1severity_level=3filter=instance%3D00c61b117ce662b735c4477061b2d8e9b829d174filter_type=regexdate_type=nowlimit=20view=Search[image: Dynamic Icon]Dynamic0..0 ms274204:09:1125.0 MBytesView Logshttps://appengine.google.com/logs?app_id=s~apprtcversion_id=5.363921767398385243severity_level_override=1severity_level=3filter=instance%3D00c61b117cddf1ea5a6de21bcb0589a9a7120b6efilter_type=regexdate_type=nowlimit=20view=Search[image: Dynamic Icon]Dynamic I don't understand why there would be 2 instances. The one with Age 4:09:11 is the expected one, which I deployed this morning. I have no idea why there is a 1-hour-age instance. I didn't touch it since 4 hours ago(from Admin logs, there is no other operation too.). But anyway it doesn't matter. Even with one instance, I can see two requests arriving concurrently. I suppose if the previous request didn't return, AppEngine wouldn't send the next request. Is that true? Below log is one example: 2012-12-12 00:44:26.114 /_ah/channel/disconnected/ 200 1212ms 0kb I 2012-12-12 00:44:24.992 Deleted the saved message for 62521007/40633129 I 2012-12-12 00:44:26.078 User 40633129 removed from room 62521007 I 2012-12-12 00:44:26.078 Room 62521007 has state [75621126-True] I 2012-12-12 00:44:26.113 Sent BYE to 75621126 W 2012-12-12 00:44:26.113 User 40633129 disconnected from room 62521007 2012-12-12 00:44:25.101 /message?r=62521007u=40633129 200 243ms 0kb Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.21 (KHTML, like Gecko) Chrome/25.0.1357.0 Safari/537.21 I 2012-12-12 00:44:24.980 Deleted the saved message for 62521007/40633129 I 2012-12-12 00:44:25.064 User 40633129 quit from room 62521007 I 2012-12-12 00:44:25.065 Room 62521007 has state [75621126-True] I 2012-12-12 00:44:25.100 Delivered message to user 75621126 The message and /disconnect are processed within overlapped period by the same instance. So is this a problem? I'm not sure whether the DB processing would have any impact or not, which might take dozens of milliseconds in each handler. Thanks! /Brave On Monday, December 17, 2012 3:00:51 PM UTC+8, PK wrote: The instances I mean are the ones reported in the dashboard. With threadsafe set to false, each instance will run only one Request handler at a time BUT multiple instances can run simultaneously. Click Instances and then look at the log of each instance to see what it is doing. On Dec 16, 2012, at 10:52 PM, brave yao brav...@gmail.com javascript: wrote: Hi PK, What's the 'instances' you mean here? Take my app as example: app = webapp2.WSGIApplication([ ('/', MainPage), ('/message', MessagePage), ('/_ah/channel/connected/', ConnectPage), ('/_ah/channel/disconnected/', DisconnectPage) ], debug=True) Do you mean each RequestHandler class is an instance and requests could be passed concurrently to i.e. MessagePage and ConnectPage? Thanks! /Brave On Wednesday, December 12, 2012 5:16:11 PM UTC+8, PK wrote: Hi Brave, Even if you set threadsafe to false requests can still be handled in parallel by different instances. If you set it to true more than one requests can be handled in parallel by the same instance, as well. PK On Dec 12, 2012, at 12:43 AM, brave yao brav...@gmail.com wrote: Hi, The GAE doc says By default, App Engine sends requests serially to a given web server. If you are using the Python 2.7 runtime, you can configure App Engine to send multiple, parallel requests by adding the threadsafe: true element to the header of app.yaml.. How should I understand this statement? In fact I define 'threadsafe: false' in my app.yaml. But still I can see requests are routed to my handlers at same time. I suppose with 'threadsafe: false', no other request won't be sent into my server before current handler returns. Is this understanding correct? Is this a bug or I miss something here? PS: the codes locate here: https://code.google.com/p/webrtc-samples/source/browse/trunk/apprtc/ Thanks! /Brave -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/q0sEgcGSLqgJ. To post to this group, send email to google-a...@googlegroups.com. To unsubscribe from this group, send email to google-appengi...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. --
Re: [google-appengine] Question about Using Concurrent Requests (Python 2.7)
Hi PK, What's the 'instances' you mean here? Take my app as example: app = webapp2.WSGIApplication([ ('/', MainPage), ('/message', MessagePage), ('/_ah/channel/connected/', ConnectPage), ('/_ah/channel/disconnected/', DisconnectPage) ], debug=True) Do you mean each RequestHandler class is an instance and requests could be passed concurrently to i.e. MessagePage and ConnectPage? Thanks! /Brave On Wednesday, December 12, 2012 5:16:11 PM UTC+8, PK wrote: Hi Brave, Even if you set threadsafe to false requests can still be handled in parallel by different instances. If you set it to true more than one requests can be handled in parallel by the same instance, as well. PK On Dec 12, 2012, at 12:43 AM, brave yao brav...@gmail.com javascript: wrote: Hi, The GAE doc says By default, App Engine sends requests serially to a given web server. If you are using the Python 2.7 runtime, you can configure App Engine to send multiple, parallel requests by adding the threadsafe: true element to the header of app.yaml.. How should I understand this statement? In fact I define 'threadsafe: false' in my app.yaml. But still I can see requests are routed to my handlers at same time. I suppose with 'threadsafe: false', no other request won't be sent into my server before current handler returns. Is this understanding correct? Is this a bug or I miss something here? PS: the codes locate here: https://code.google.com/p/webrtc-samples/source/browse/trunk/apprtc/ Thanks! /Brave -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/q0sEgcGSLqgJ. To post to this group, send email to google-a...@googlegroups.comjavascript: . To unsubscribe from this group, send email to google-appengi...@googlegroups.com javascript:. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/VL3SFMaTOukJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Question about Using Concurrent Requests (Python 2.7)
Hi, The GAE doc says By default, App Engine sends requests serially to a given web server. If you are using the Python 2.7 runtime, you can configure App Engine to send multiple, parallel requests by adding the threadsafe: true element to the header of app.yaml.. How should I understand this statement? In fact I define 'threadsafe: false' in my app.yaml. But still I can see requests are routed to my handlers at same time. I suppose with 'threadsafe: false', no other request won't be sent into my server before current handler returns. Is this understanding correct? Is this a bug or I miss something here? PS: the codes locate here: https://code.google.com/p/webrtc-samples/source/browse/trunk/apprtc/ Thanks! /Brave -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/q0sEgcGSLqgJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Question about Using Concurrent Requests (Python 2.7)
Hi Brave, Even if you set threadsafe to false requests can still be handled in parallel by different instances. If you set it to true more than one requests can be handled in parallel by the same instance, as well. PK On Dec 12, 2012, at 12:43 AM, brave yao brave...@gmail.com wrote: Hi, The GAE doc says By default, App Engine sends requests serially to a given web server. If you are using the Python 2.7 runtime, you can configure App Engine to send multiple, parallel requests by adding the threadsafe: true element to the header of app.yaml.. How should I understand this statement? In fact I define 'threadsafe: false' in my app.yaml. But still I can see requests are routed to my handlers at same time. I suppose with 'threadsafe: false', no other request won't be sent into my server before current handler returns. Is this understanding correct? Is this a bug or I miss something here? PS: the codes locate here: https://code.google.com/p/webrtc-samples/source/browse/trunk/apprtc/ Thanks! /Brave -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/q0sEgcGSLqgJ. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.