MySQL Error 2013

July 31, 2007 at 5:30 am | Posted in koteshwara, mysql, Technical | Leave a comment

Of all MySQL errors, Error Number 2013 is most frustrating and annoying.

MySQL Errors like 1062(Duplicate Entry), 2002(Server is not started), 2006(Server has gone away) are easy to identify and solve. 2013 signifies lost connection to server in midst of query execution.

2013 is frustrating because, you can’t produce it again for same sequence of actions. So you never know when it will come or when it won’t.

Finally, I have come up with few points to look for when MySQL Error 2013 occurs.

1. check for MySQL Status
shell> mysql -u root -p -e “\s” | grep Uptime

It will give uptime of MySQL Server. If it is less than 1 min, then server must have gone down and started again. So, you have look for Status Variable wait_timeout. By default, wait-timeout will be 28800 sec (8 Hours). Developer can change it while starting a server(change has to be done in my.cnf file) or by setting parameter “CLIENT_INTERACTIVE” in “mysql_real_connect()”. If Uptime is not less than a min, then there is a problem with Query.

Query can be too long or it is syntactically correct but not semantically.

Example: I am running a stored procedure spLogin(uname, pword, status). Here uname and pword are input parameters and status output parameter. To supply input to this stored procedure, I use user defined variables.

So, order of queries will be
mysql > SET @user = ‘sarma’, @passwd = ‘sarma’;
mysql > call spLogin(@username, @password, @status);
There is a chance that it will give an error 2013, as query is syntactically correct, but values passed to query are garbage.

Remedy will be
mysql> call spLogin(@user, @passwd, @status);
query Success(if stored procedure is correct).

But as I said earlier, it is tough to reproduce Error 2013. Care should be taken in passing inputs to either Queries or Stored Procedures and wait_timeout should be atleast 4 Hrs.

Why Startup ?

July 26, 2007 at 12:58 pm | Posted in koteshwara, opinion | Leave a comment

Many of my friends ask me why Did you choose a start up when you have offers from some other MNCs.

I question them what is the advantage of working in a MNC which is not in a start-up. They told me that when you are swicthing from one job to other job, there will be less risk and you need not to advertize about your company, you carry a brand name, if you work in a MNC. My reasoning to them is, Why should I think of swicthing my job before joining in that? If I am not satisfied with the work I am doing or If I am not fit into the team , then only I think of swicthing job. So doing work is my priority, which I certainly get in a start-up. I am not sure whether I’ll be assigned work from Day 1, if I join in a MNC. I am not against working in MNCs, they have their own headaches. Its true that Resource Management is the toughest thing. The reason, I opted for start-up is if I work for some time, then I can get job in MNC at any time. But if join in a MNC and happened to be on bench (or member of Freepool), then it would be tough.

Working in a start-up gives you the next best chance to see how a company shapes up.(Best chance to see is to start a company). Working in a start-up has other advantage, you can watch the building process of a company very closely,you know ups and downs in making it Big. More importantly, every one’s voice is heard in a start-up, so u can raise your voice, you can take part in design discussions, brain storming sessions. This is all happens in MNCs also, but you need to gain some experience, before raising your voice.

Two Days at MTNL Training Centre

July 20, 2007 at 12:40 pm | Posted in Event, seminar, vegayan | Leave a comment

MPLS Training sessions at MTNL

Some of us (Amit, Dakshina, Prashant and Vijay ) from Vegayan attended the two days sessions on MPLS Technology at MTNL, Training Centre in Hiranandani, Powai. Prof. Girish Saraph was the speaker in those sessions. The sessions were attended by high ranking officials from MTNL. I must say it was very good experience to know about the latest in MPLS Technology tracing through earlier connection oriented technologies like X.25, frame relay and ATM. I am eagerly looking forward to gain from similar events in future.

7 Habits of Most Effective People

July 1, 2007 at 6:54 pm | Posted in seminar | 1 Comment

Prof. Kulkarni

We have a series of talks at Vegayan on “7 Habits of Highly Effective People” by Prof Kulkarni, IITB. He brings with him experience of training Executives and Foremen at Crompton Greaves. These talks are based on the book with the same title. The book teachings are nothing but bare common sense. The seven habits provide a framework for understanding personal development.

The Seven Habits

  • Be Proactive
  • Begin with the End in Mind
  • Put First Things First
  • Think Win Win
  • Seek First to Understand, Then be Understood
  • Synergize
  • Sharpen the Saw

We thank Prof. Kulkarni for the insight into these seven habits.

Blog at WordPress.com.
Entries and comments feeds.