Skip to main content

Posts

Showing posts with the label Google App Engine

Things I Learned: Google App Engine Django Platform Search Index Updates

Let's say you have a deployed Google App Engine application you've been using for years like the ham radio practice exams we're updating here. You decide to output data the app is obviously using all the time. For us, it was the table of help topic links for each exam question. You think you're going to output the data easily, and then: NeedIndexError: no matching index found. recommended index is and nothing. This happened here today, (obviously right?) I had to walk through a series of documentation steps and log messages, but the answer in the end was simple. First, the message above doesn't turn up in your app, it turn up in your log message explorer. For us, that's at  https://console.cloud.google.com/logs/query;cursorTimestamp=2023-07-03T15:57:44.595552Z?project=hamdaise Next, that's where you'll find an actually very handy error message with this at the bottom (your data model will be different unless you forked the ham radio exam repo .) That...

App Engine: Fixing “414 URI Too Long” by Posting Data Correctly

I've been working on an applciation utilizing Google's App Engine. The first version of my application sent about 500 bytes of information along with each user POST request. The second version upped this to around 100 bytes and the App Engine server started giving the error: Requested URI too long: ... HTTP/1.1" 414 – This is the http error returned when a post request is longer than the server is configured to accept. After a little research I found this excellent article: http://www.openjs.com/articles/ajax_xmlhttp_using_post.php that solved my problem. The short version of the article is: Don’t send the post parameters as part of the url, send them using the XMLHTTP object’s send method once the object has been opened using only the address, (everything before the ?), of the original post url. So, the original code that looked like: var my_url = "/myhandler?longstring=" + ...