Q: I keep getting ‘Error 500′ when I try to upload / deploy to my code to the google app engine via ‘appcfg.py update’ or similar, what’s going on?

 

A: Most often this error is caused by problems with the Google cloud infrastructure and as such there is nothing you can do to fix the problem except wait and keep retrying every now and again, the problem normally goes away in an hour or 2. Do however check that your various quotas havent run out.

 

Don’t be suprised if when you view the System Status table, you see that it is all green – in our experience this status grid rarely represents the status of the cloud as experienced by developers and users. You could report the problem to Google here as suggested in the error message however if you were to report every service interruption you wouldn’t be left with very much time to do much else… ;-)

 

Related Posts

We were engulfed by a blizzard of Google task queue ‘TransientErrors’ over the weekend, the ‘TransientError’ is one most ellusive of google app engine errors. This is what the official documentation has to say of it:

 

exception TransientError(Error)
There was a transient error while accessing the queue. Please try again later.

This very detailed description has left many scratching their heads wondering (a) Why they are getting the errors and (b) What should they do about them!

 

So far, the best description I could find of the error is here:
http://osdir.com/ml/GoogleAppEngine/2009-06/msg01337.html

 

A TransientError is an unexpected but transient failure. Typically it
is a deadlined or otherwise missed connection between two backends in
our system. We distinguish TransientError from InternalError to say
that transient errors failed but were expected to succeed (and
retrying will probably work), whereas InternalError is quite
unexpected and retries will have no effect.

 

This seems to suggest that you shouldn’t worry too much about them as they happen rarely and the automatic retry should work – no harm done…

 

In our experience however it seems that the error is far from transient in that it often occurs in batches with the retries experiencing the error too – it causes our app to grind to a halt, the whole thing tends to snowball. It is like something fairly serious goes wrong with the google cloud and things just stop working.

 

Does anybody know if there is any reliable way of handling these errors when they occur?

 

And more seriously, can an application be made reliable on the google cloud with nasty undocumented errors like this cropping up in batches every few months? I suppose software development for cloud environments is still really only in its infancy, developers and platform suppliers have a lot to learn, but unexplained stealth errors like the TransientError really doesn’t help the situation!


Related Posts

Yesterday I came across this gem of a Blog post on Nick Johnson’s Blog about how to go about efficiently storing Google App Engine datastore objects in Memcache on the cloud.

 

I had previously read that the Datastore models were large and carried around a lot of baggage (software baggage that is, not the stuff on wheels!) – this is one reason why you are discouraged from passing them as arguments to tasks on task-queues.

 

This blog shows you how to extract and store only the essential info from the objects for storage in memcache using th methids model_to_protobuf () and model_from_protobuf()

 

Anyway, enough chat – here’s the post:

 

http://blog.notdot.net/2009/9/Efficient-model-memcaching

 
 

Related Posts

Q: How do I get a python object’s class name?

 

A: Use the object’s __class__ attribute and then get its __name__ attribute.

 

Another python introspection gem, to get an object’s class name just access its __class__ attribute, for example you can define a method to return the object’s name as follows:

def get_runtime_type_name(self):
  return self.__class__.__name__

Related Posts

Q: How do I get the name of the current python function, I want to output its name as part of some logging information.

 

A: Just import the ‘inspect’ module and call its stack() method to get access to the call stack, for example, to get the name of the current function:

 
import inspect

 

fn_name = inspect.stack()[1][3]

 

The first index indicates the stack position, so to get the name of the parent calling function use:

 
import inspect

 

fn_name = inspect.stack()[2][3]

 

or to define a function that returns the name of the function from which it was called:

import inspect

 

def get_current_function():
  return inspect.stack()[2][3]

 

Introspection is one of the really cool features of modern software programming languages!


Related Posts

I have been at software design for quite a while now and UML has been my constant companion for a good part of this time. Whenever I think of UML I think how great it is for helping with software design, but also how more or less uinversely rubbish most of the UML design applications are.

 

I have used tonnes of them, the big and expensive ones, the small funky ones and the in between ones and they all have their problems. I especially hate the ones that require at least 100 mouse clicks and popup options screens to get anything done, they are a real RSI minefield! Sometimes I think you would be better off with a pen and paper…

 

Every so often I go and on the hunt for new or improved offerings, testing them on real projects. This all takes time and I haven’t gone on such a hunt for 2 years now – So could anybody please recommend what they think is the best UML package out there at the moment and hopefully save me some time?

 

Here are some of the things I would like from a design app:

 
  • Efficient user interface, the less clunky context menus and mouse clicks the better!
  • Not tied to any particular programming language
  • Affordable (open source would be great!)
  • Standards Compliant (no renaming or reinventing of bits of the UML)
  • Easy to copy diagrams out into other documents
  • Good support for the different diagram types
 

Oh also, are there any decent cloud offerings?

 

Cheers – looking forward to hear your suggestions!


Related Posts

  • No Related Post

These days most software developers need deal with more than one software development technology and programming language on a day to day basis. This often means that they have to switch back and forth between coding styles, with this in mind I noticed that although the MS coding guidelines for C# in .NET recommend K&R style braces for code blocks, e.g:

 
if (sneeze) {
  nose.Blow();
}
 

By default Visual Studio’s auto code formatting stuff will format your code with braces on newlines, e.g.:

 
if (sneeze)
{
  nose.Blow();
}
 

Very interesting indeed, I wonder are there internal coding style conflicts within Microsoft…


Related Posts

If you use testimonials on magento and then place them onto a page that contains the prototype extension showcase, you may notice that both the testimonial and showcase animation stops working, and that an absolute snow of javascript errors are generated.

 

If this is happens to you, it may be caused by a jQuery library conflict. The testimonials PHP template directly includes jQuery and this may clash with the prototype library, we found that we could resolve the library conflict by placing good old:

 
jQuery.noConflict();
 

In the file testimonial_advance.phtml just before document/ready, like this…

 
jQuery.noConflict();

 

jQuery(document).ready(function() {
….
}

 

Adding this solved the problem for us.

 

testimonial_advance.phtml should be found in this folder:

 

app/design/frontend/default/default/template/testimonial

 

However, it is not good magento practice to alter this version of the file, instead you should create a testimonials folder under:

 

app/design/frontend/default/[your folder]/template/

 

Then copy testimonial_advance.phtml to this folder and edit it there. Remember to clear the magento cache when testing changes!


Related Posts

In the Software Development game there are always plenty of annoying problems that will just eat up your time, what I really hate is being caught out by the same annoying problem more than once… I have been caught out by this one before so this time I am going to write it down!

 

So the situation is that you just can’t login to Microsoft SQL Express 2008 via the Management Studio or by any other means using the ‘SQL Authentication’ method. You can login using ‘Windows Authentication’ fine, and can then add SQL users and change their passwords and configure their permissions etc. etc. but you can never login with these users…

 

If you are experiencing the above the most likely cause that ‘SQL Authentication’ isn’t enabled at all! And Management Studio doesn’t bother to remind you of this when it lets you add, configure and enable such logins.

 

Well, to check if ‘SQL Authentication’ is enabled, and to enable it if it’s not try the following:

 

Login into Management Studio, right click on your server and choose ‘properties’. Click on the ‘Security’ tab, make sure that the ‘SQL Server and Windows Authentication Mode’ radio button is checked and hit OK.

 

Hopefully all of your SQL logins will work now, ours did!

 

If after you have done this, you still can’t login as ‘sa’, edit the users’s properties and under ‘Status’ tab, make sure that the ‘Login:’ radio button is set to ‘Enabled’ – It may have been disable during installation.


Related Posts

Surewash have just put their new website live to coincide with the launch of their hand hygine training product at the Matter Private Hospital. This time it was ‘our’ Sinead who designed and built the website which runs atop WordPress and we are very proud of how it looks and performs.

 

Meanwhile, we wish Surewash and the Matter Private every success with the launch!


Related Posts

  • No Related Post