On Thu, Feb 19, 2015 at 9:11 AM, Syed Rizvi <ammari...@gmail.com> wrote:
> This is my first GAE project and I'm not a paid user yet so upgrading > isn't currently an option nor increasing idle instances since not even a > single instance is up yet. Cron isn't an option currently since the dataset > has to be there to fulfill even the first request that comes in (but it can > be later used when, let's say, I have to update the dataset regularly from > the source). > > I don't think that the warmup request solution may work for me > Yes, the warmup request is still subject to the same limit; I just wanted to make sure that part of your application was working and didn't have a confounding issue. The bottom line is that you need to move the dataset initialization logic out of init, and/or find a way to cut down execution time to under 1 minute (either speeding up the logic or optimizing it). If you don't want to pay for a larger instance to speed up the dataset processing, you'll need to modify your application logic. I would suggest (in no particular order) the following: 1. Reconfigure your application's code to separate out parts of the processing. For example, perhaps your init could urlfetch your dataset, and nothing more. When a request comes in, process only the part of the data relevant to the request. Obviously this option might not work if you can't subdivide your data easily. 2. Profile your application's calls using AppStats: https://cloud.google.com/appengine/docs/java/tools/appstats . If your dataset initialization process involves several RPC calls, you might be able to batch calls together and save some time. For example, instead of using multiple memcache.put() calls you can try moving to AsyncMemcacheService.putAll(). 3. You can also cut down on startup time by optimizing your entire app. If you're including many libraries in your application, you can use ProGuard <https://groups.google.com/d/msg/google-appengine/kbHQBhsejik/D0pK5NewJW0J>to help cut down on unneeded files (assuming you're using Java). 4. There's a bunch of other performance tips at this article: https://cloud.google.com/appengine/articles/deadlineexceedederrors and a handful of others at this Groups thread https://groups.google.com/d/msg/google-appengine/sA3o-PTAckc/vsS976sdINMJ ----------------- -Vinny P Technology & Media Consultant Chicago, IL App Engine Code Samples: http://www.learntogoogleit.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 post to this group, send email to google-appengine@googlegroups.com. Visit this group at http://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CALSvALA9zk0LQBfSAQmKOopWnVmxKz4exsTNgWuCQsVmEcPGLw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.