Python TCP echo server
The folks using it claim "it is going down evey now and again".


Well, yes. If they don't send you a message in 20 seconds, you're disconnecting them! Why? Simply removing that block is probably what you want.

Separation of Concerns

Your server_socket function both creates a server and handles the busy loop. You should split those into two functions:

def make_server(ip, port):
    ...

def run_echo(server):
    ...

server = make_server(ip, port)
run_echo(server)


Echoing

You wrap your echo block in a try/except. Why? What part of that code can raise an exception? What exception is raised? You should prefer to only catch precisely the exceptions that are raised (to avoid, for instance, catching SyntaxError and hiding whatever typo you wrote in your code), but in this case I don't know what exception you would be catching.

Also, you don't need to print str(len(data)), you can just print len(data).