Hi i've searched the App Engine Groups but couldn't find a definitive solution.
I want to put 1000 entities into my App Engine Server (Production Server), but I get timeout errors and also 500 Server errors. It worked perfectly in local development.
To reduce the Put load, I made the code sleep for 5 seconds after every 10 puts. I still got the same errors :(
Please point me in the right direction. Really appreciate your insights.
Code:
class User(db.Model)
nickname = db.StringProperty()
feed = db.StringListProperty()
class Initialize(webapp.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
start = 0
end = 10
#add 1000 users ( 10 Puts x 100 rows )
for row in range(1,100):
for i in range(start,end):
nickname = "nickname" + str(i)
feed = ["string1","string2","string3","string4","string5"]
User(key_name=str(i),nickname=nickname,feed=feed).put()
self.response.out.write('Entry %s done\n' % i)
#add counters by 10
start = start + 10
end = end + 10
#sleep
time.sleep(5)
self.response.out.write('Initialized 1000 users for Datastore.')