Each request can only run 30 seconds in server side,

but in development server, there is no limitation on it...

On Wed, Apr 29, 2009 at 11:56 PM, tayknight <[email protected]> wrote:
>
> And, I should add, this works perfecty (and quickly) from the
> development server's datastore.
>
> On Apr 29, 8:31 am, tayknight <[email protected]> wrote:
>> I have a problem. I'm getting datastore timeouts when doing reads. The
>> code finished about 5% of the time. The code looks like:
>>
>> alerts = Alert.all().filter('expires >= ', datetime.datetime.now())
>> # ge active alerts
>> for alert in alerts:
>>   #get the db.Keys from the ListProperty
>>   zones = ZoneMaster.get(alert.zones)
>>   for zone in zones:
>>     if zone:
>>       #get the users for this zone
>>       if zone.siteusers:
>>         us = SiteUser.get(zone.siteusers)
>>           for u in us:
>>             if u:
>>               self.response.out.write(u.name + '<br />')
>>
>> The Model looks like:
>> class Alert(db.Model):
>>   effective = db.DateTimeProperty()
>>   expires = db.DateTimeProperty()
>>   zones = db.ListProperty(db.Key)
>>
>> class ZoneMaster(db.Model):
>>   siteusers = db.ListProperty(db.Key)
>>
>> class SiteUser(db.Model):
>>   name = db.StringProperty()
>>   zone = db.ReferenceProperty(ZoneMaster)
>>
>> This code is repeatably timing out with a "Timeout: datastore timeout:
>> operation took too long." error.
>> I'm not doing any writes. All the reads are by key (that come from a
>> ListProperty). Why would this be timing out?
>>
>> Thanks.
> >
>



-- 

Cheers!

Liang Zhao

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to